/*untuk container form*/
.form-container {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    padding: 32px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
}

.form-header {
    margin-bottom: 28px;
}

.form-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #f1f5f9;
    margin-bottom: 6px;
    letter-spacing: -0.02em;
}

.form-header p {
    font-size: 0.875rem;
    color: #64748b;
    line-height: 1.5;
}

/*error box*/
.error-box {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: rgba(239, 68, 68, 0.06); /* Merah transparan tipis */
    border: 1px solid rgba(239, 68, 68, 0.25); /* Border glow neon */
    border-left: 4px solid #ef4444; /* Aksen garis tebal di kiri */
    color: #fca5a5;
    padding: 16px;
    padding-right: 44px;
    border-radius: 14px;
    margin-bottom: 24px;
    text-align: left;
    position: relative;

    /* Transisi untuk animasi fade-out via JS */
    transition: opacity 0.3s ease, transform 0.3s ease;

    /* Animasi smooth slide down saat ter-trigger */
    animation: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.error-icon {
    font-size: 1.25rem;
    line-height: 1;
    padding-top: 2px;
}

.error-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.error-text strong {
    font-size: 0.938rem;
    font-weight: 700;
    color: #fecaca;
}

.error-text p {
    font-size: 0.875rem;
    color: #fca5a5;
    line-height: 1.4;
}

/*input & label styling*/
.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 24px;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #94a3b8;
    text-align: left;
}

/* Base style untuk Textarea & Select */
.form-group textarea,
.form-group select {
    width: 100%;
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    color: #f8fafc;
    font-family: inherit;
    font-size: 0.938rem;
    padding: 14px 16px;
    outline: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Textarea khusus */
.form-group textarea {
    height: 150px;
    resize: vertical;
    min-height: 100px;
    line-height: 1.6;
}

/* Efek Focus (Saat input diklik) */
.form-group textarea:focus,
.form-group select:focus {
    border-color: #00b4ff;
    background: rgba(15, 23, 42, 0.6);
    box-shadow: 0 0 0 4px rgba(0, 180, 255, 0.15);
}

/* Styling dropdown option agar tulisan di dalamnya kelihatan pas di klik */
.form-group select option {
    background: #0f172a;
    color: #f8fafc;
}

/* ==========================================================================
   4. BUTTON SUBMIT STYLING
   ========================================================================== */
.btn-submit {
    width: 100%;
    background: linear-gradient(135deg, #00d084, #00b4ff);
    border: none;
    border-radius: 14px;
    color: #ffffff;
    cursor: pointer;
    font-size: 0.938rem;
    font-weight: 600;
    padding: 14px;
    text-align: center;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 208, 132, 0.2);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 180, 255, 0.4);
}

.btn-submit:active {
    transform: translateY(0);
}

/* ==========================================================================
   5. KEYFRAMES ANIMATION & RESPONSIVE
   ========================================================================== */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Handphone */
@media (max-width: 600px) {
    .form-container {
        padding: 20px;
        border-radius: 20px;
    }
}

/* Menata posisi tombol X pas di TENGAH SECARA VERTIKAL */
.close-btn {
    position: absolute;
    top: 50%; /* Dorong ke bawah 50% dari tinggi kontainer */
    right: 16px;
    transform: translateY(-50%); /* Tarik ke atas setengah dari ukuran tombol itu sendiri */
    background: none;
    border: none;
    color: #fca5a5;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.close-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}

.error-box.fade-out {
    opacity: 0;
    transform: translateY(-10px);
}
