/* =============================================
   SIGNUP PAGE - CUSTOM STYLES
   Overrides & Additions on top of main style.css
   ============================================= */

/* ---- Hero Overrides ---- */
.signup-hero {
    min-height: auto;
    padding-top: 110px;
    padding-bottom: 40px;
}
.setup-hero {
    display: flex;
    justify-content: center;
    text-align: center;
    width: 100%;
}
.centered-hero {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.hero-logo-img.white-logo {
    height: 120px;
    filter: brightness(0) invert(1);
    margin-bottom: 12px;
    display: block;
}

/* ---- Form Section ---- */
.form-section {
    padding: 0 0 60px 0;
    position: relative;
    z-index: 10;
}
.form-container {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 16px;
}

/* ---- Card ---- */
.signup-card {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    overflow: hidden;
    border: 1px solid #e8ecf0;
}

/* ---- Tabs ---- */
.tabs {
    display: flex;
    background: #f7f9fc;
    border-bottom: 2px solid #e8ecf0;
}
.tab-btn {
    flex: 1;
    padding: 18px 8px;
    font-size: 1rem;
    font-weight: 700;
    font-family: 'Cairo', sans-serif;
    color: #94a3b8;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1.4;
}
.tab-btn i { margin-left: 6px; }
.tab-btn:hover { color: #4A9D9C; background: rgba(74,157,156,0.04); }
.tab-btn.active {
    color: #0a192f;
    border-bottom-color: #0a192f;
    background: #fff;
}

/* ---- Tab Content ---- */
.tab-content {
    display: none;
    padding: 36px 40px;
    animation: slideUp 0.35s cubic-bezier(0.16,1,0.3,1);
}
.tab-content.active { display: block; }

@keyframes slideUp {
    from { opacity:0; transform:translateY(12px); }
    to { opacity:1; transform:translateY(0); }
}

/* ---- Form ---- */
.interactive-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.form-row {
    display: flex;
    gap: 16px;
}
.form-row .half { flex: 1; min-width: 0; }

/* ---- Input Group (Floating Label pattern) ---- */
.input-group {
    position: relative;
    border-radius: 10px;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    transition: border-color 0.25s, box-shadow 0.25s;
    overflow: visible; /* allow error messages to show outside */
}
.input-group:focus-within {
    border-color: #4A9D9C;
    box-shadow: 0 0 0 3px rgba(74,157,156,0.12);
    background: #fff;
}

/* All text inputs */
.input-field {
    display: block;
    width: 100%;
    padding: 26px 42px 8px 14px; /* RTL: icon on right = padding-right */
    background: transparent;
    border: none;
    outline: none;
    font-size: 0.97rem;
    font-family: 'Cairo', sans-serif;
    color: #1e293b; /* ← DARK TEXT - fixed white text issue */
    border-radius: 10px;
    caret-color: #4A9D9C;
}
.input-field::placeholder { color: transparent; }

/* Floating Label */
.floating-label {
    position: absolute;
    right: 42px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.95rem;
    color: #94a3b8;
    pointer-events: none;
    transition: all 0.25s cubic-bezier(0.25,0.8,0.25,1);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: calc(100% - 60px);
}
/* Float up when focused or filled */
.input-field:focus ~ .floating-label,
.input-field:not(:placeholder-shown) ~ .floating-label {
    top: 10px;
    transform: translateY(0);
    font-size: 0.72rem;
    color: #4A9D9C;
    font-weight: 700;
}

/* Icon */
.input-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #cbd5e1;
    font-size: 1rem;
    pointer-events: none;
    transition: color 0.25s;
}
.input-group:focus-within .input-icon { color: #4A9D9C; }

/* Static label (for selects & dates) */
.static-label {
    position: absolute;
    right: 14px;
    top: 8px;
    font-size: 0.72rem;
    color: #4A9D9C;
    font-weight: 700;
    pointer-events: none;
}

/* Selects */
.select-field {
    padding: 28px 14px 8px 14px !important;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    color: #1e293b !important; /* ← DARK TEXT - fixed white text issue */
    background: transparent !important;
    border: none;
    outline: none;
    width: 100%;
    font-size: 0.97rem;
    font-family: 'Cairo', sans-serif;
    cursor: pointer;
}
/* Colorful placeholder option */
.select-field option[value=""] { color: #94a3b8; }
.select-field option { color: #1e293b; }
/* Custom dropdown arrow */
.select-group::after {
    content: '\f107'; /* fa-chevron-down */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
    transition: transform 0.25s;
}
.select-group:focus-within::after {
    transform: translateY(-50%) rotate(180deg);
    color: #4A9D9C;
}

/* Error text */
.input-error {
    font-size: 0.8rem;
    color: #ef4444;
    margin-top: 4px;
    padding-right: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}
.input-error::before { content: '⚠ '; }
.input-error.hidden { display: none; }

/* =============================================
   PHONE GROUP - Complete redesign
   ============================================= */
.phone-wrapper {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

/* Phone flag/code selector */
.phone-flag-select {
    flex-shrink: 0;
    position: relative;
}
.phone-flag-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 12px;
    height: 100%;
    min-height: 60px;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    font-family: 'Cairo', sans-serif;
    font-size: 0.9rem;
    color: #1e293b;
    transition: all 0.25s;
    white-space: nowrap;
    min-width: 100px;
}
.phone-flag-btn:hover, .phone-flag-btn.open {
    border-color: #4A9D9C;
    box-shadow: 0 0 0 3px rgba(74,157,156,0.12);
    background: #fff;
}
.flag-emoji { font-size: 1.3rem; }
.code-text { font-weight: 700; color: #0a192f; font-size: 0.9rem; }
.flag-caret {
    color: #94a3b8;
    font-size: 0.7rem;
    transition: transform 0.2s;
    margin-right: auto;
}
.phone-flag-btn.open .flag-caret { transform: rotate(180deg); }

/* Country dropdown */
.phone-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    width: 280px;
    background: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.12);
    z-index: 1000;
    display: none;
    overflow: hidden;
}
.phone-dropdown.open { display: block; }

.phone-search {
    padding: 10px 12px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    gap: 8px;
}
.phone-search input {
    flex: 1;
    border: none;
    outline: none;
    font-family: 'Cairo', sans-serif;
    font-size: 0.9rem;
    color: #1e293b;
}
.phone-search i { color: #94a3b8; }

.country-list {
    max-height: 220px;
    overflow-y: auto;
    list-style: none;
    padding: 6px 0;
}
.country-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    cursor: pointer;
    transition: background 0.15s;
    font-size: 0.92rem;
    color: #1e293b;
}
.country-list li:hover { background: #f8fafc; }
.country-list li.selected { background: rgba(74,157,156,0.08); color: #4A9D9C; font-weight: 700; }
.country-list li .c-flag { font-size: 1.2rem; }
.country-list li .c-name { flex: 1; }
.country-list li .c-code { color: #94a3b8; font-size: 0.85rem; }

/* Phone number input box */
.phone-input-wrap {
    flex: 1;
    position: relative;
    border-radius: 10px;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    transition: border-color 0.25s, box-shadow 0.25s;
    display: flex;
    align-items: center;
}
.phone-input-wrap:focus-within {
    border-color: #4A9D9C;
    box-shadow: 0 0 0 3px rgba(74,157,156,0.12);
    background: #fff;
}
.phone-input-wrap .wa-icon {
    position: absolute;
    right: 12px;
    color: #25d366;
    font-size: 1.15rem;
}
.phone-input-wrap input[type="tel"] {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    padding: 18px 40px 18px 14px;
    font-size: 1rem;
    font-family: 'Cairo', sans-serif;
    color: #1e293b;
    direction: ltr; /* numbers LTR */
    text-align: right;
}
.add-phone-btn {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1.5px solid #e2e8f0;
    background: #f8fafc;
    color: #4A9D9C;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    transition: all 0.2s;
}
.add-phone-btn:hover { background: #4A9D9C; color: #fff; border-color: #4A9D9C; }
.add-phone-btn.minus { color: #ef4444; border-color: #fecaca; }
.add-phone-btn.minus:hover { background: #ef4444; color: #fff; border-color: #ef4444; }

/* ---- Nested conditional fields ---- */
.nested-fields {
    background: #f8fafc;
    border: 1.5px dashed #4A9D9C;
    border-radius: 12px;
    padding: 20px;
    animation: slideUp 0.3s ease;
}
.nested-fields.hidden { display: none; }
.sub-section-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: #0a192f;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.sub-section-title i { color: #4A9D9C; }
.help-text {
    font-size: 0.78rem;
    color: #94a3b8;
    margin-top: 4px;
    padding-right: 4px;
}

/* ---- Payment Info Box ---- */
.payment-info-box {
    background: linear-gradient(135deg, #e8f5e9, #f1f8e9);
    border: 1.5px solid #a5d6a7;
    border-radius: 14px;
    padding: 20px 22px;
}
.payment-info-box > h4 {
    color: #1b5e20;
    font-size: 1.05rem;
    font-weight: 800;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.payment-schedule {
    list-style: none;
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.payment-schedule li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.9rem;
    color: #2e7d32;
    line-height: 1.55;
}
.payment-schedule li .pay-icon {
    color: #4A9D9C;
    margin-top: 2px;
    flex-shrink: 0;
}

.payment-accounts {
    background: #fff;
    border-radius: 10px;
    padding: 14px 16px;
    border: 1px solid #c8e6c9;
}
.account-name {
    font-size: 0.9rem;
    color: #1b5e20;
    margin-bottom: 12px;
    font-weight: 700;
}
.banks-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
.bank-item { display: flex; flex-direction: column; gap: 5px; }
.bank-title {
    font-weight: 800;
    font-size: 0.87rem;
    color: #0a192f;
    border-bottom: 1px solid #e8f5e9;
    padding-bottom: 5px;
    margin-bottom: 4px;
}
.bank-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: #475569 !important;  /* force dark - never let it go white */
    margin-bottom: 3px;
}
.bank-row span {
    color: #475569 !important;
}
.bank-row code {
    background: #e8f5e9;
    color: #0a192f !important;  /* force near-black on code */
    font-family: inherit;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 5px;
    font-size: 0.87rem;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: background 0.15s;
}
.bank-row code:hover { background: #4A9D9C; color: #fff !important; }
.copy-hint { font-size: 0.72rem; color: #94a3b8 !important; margin-top: 3px; }

/* ---- File Upload ---- */

.upload-title {
    font-size: 0.95rem;
    color: #0a192f;
    margin-bottom: 10px;
    font-weight: 800;
}
.required { color: #ef4444; }

.file-drop-area {
    position: relative;
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    padding: 28px 20px;
    text-align: center;
    background: #f8fafc;
    transition: all 0.3s ease;
    cursor: pointer;
    overflow: hidden;
}
.file-drop-area:hover, .file-drop-area.dragover {
    background: #f0fafa;
    border-color: #4A9D9C;
}
.file-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 10;
}
.drop-icon i {
    font-size: 2.5rem;
    color: #4A9D9C;
    margin-bottom: 10px;
    display: block;
    transition: transform 0.3s;
}
.file-drop-area:hover .drop-icon i { transform: translateY(-5px); }
.drop-msg p { font-size: 0.95rem; color: #475569; font-weight: 600; margin-bottom: 8px; }
.file-info-badge {
    display: inline-block;
    background: rgba(74,227,160,0.15);
    color: #166534;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
}
.file-preview-area {
    position: relative;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    padding: 12px 16px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    margin-top: 12px;
}
.file-preview-area.hidden { display: none !important; }
.preview-info { display: flex; align-items: center; gap: 10px; font-weight: 600; color: #0a192f; font-size: 0.9rem; }
.file-icon { font-size: 1.4rem; color: #4A9D9C; }
.remove-btn {
    background: #fee2e2; color: #ef4444; border: none;
    width: 30px; height: 30px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: all 0.2s; flex-shrink: 0;
}
.remove-btn:hover { background: #ef4444; color: #fff; }

/* ---- Progress ---- */
.progress-wrap { margin-top: 14px; }
.progress-wrap.hidden { display: none; }
.progress-info { display: flex; justify-content: space-between; font-size: 0.85rem; font-weight: 700; color: #0a192f; margin-bottom: 6px; }
.progress-track { height: 7px; background: #e2e8f0; border-radius: 4px; overflow: hidden; }
.progress-fill { height: 100%; width: 0%; background: linear-gradient(90deg, #4A9D9C, #72E3A0); border-radius: 4px; transition: width 0.3s; }

/* ---- Submit Button ---- */
.submit-btn {
    width: 100%;
    padding: 16px;
    margin-top: 8px;
    font-size: 1.1rem;
    position: relative;
    overflow: hidden;
    border-radius: 50px;
}
.submit-btn .btn-icon { margin-right: 8px; transition: transform 0.3s; }
.submit-btn:hover .btn-icon { transform: translateX(-5px); }

/* ---- Status Tab ---- */
.status-interactive { text-align: center; padding: 30px 10px; }
.pulse-icon {
    width: 90px; height: 90px;
    background: rgba(74,157,156,0.1);
    color: #4A9D9C; font-size: 2.5rem;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%; margin: 0 auto 24px;
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(74,157,156,0.4); }
    70% { box-shadow: 0 0 0 18px rgba(74,157,156,0); }
    100% { box-shadow: 0 0 0 0 rgba(74,157,156,0); }
}
.status-interactive h3 { font-size: 1.6rem; color: #0a192f; margin-bottom: 12px; font-weight: 800; }
.status-interactive p { font-size: 1rem; color: #64748b; line-height: 1.8; margin-bottom: 28px; }
.status-btn { padding: 15px 35px; font-size: 1.1rem; }

/* ---- Feedback Messages ---- */
.form-feedback {
    margin-top: 16px; padding: 14px; border-radius: 10px;
    text-align: center; font-weight: 700; font-size: 0.95rem;
    animation: slideUp 0.3s ease;
}
.form-feedback.hidden { display: none; }
.form-feedback.success { background: #dcfce7; color: #166534; border: 1.5px solid #bbf7d0; }
.form-feedback.error { background: #fee2e2; color: #991b1b; border: 1.5px solid #fecaca; }

/* ---- Utility ---- */
.hidden { display: none !important; }

/* =============================================
   RESPONSIVE - MOBILE
   ============================================= */
@media (max-width: 768px) {
    .signup-hero { padding-top: 90px; padding-bottom: 30px; }
    
    .hero-title { font-size: 1.7rem !important; }
    .hero-subtitle { font-size: 0.9rem !important; }

    /* Countdown smaller on mobile */
    .countdown-item span { font-size: 1.8rem !important; }
    .countdown-item p { font-size: 0.7rem !important; }

    .tab-content { padding: 24px 18px; }
    .tab-btn { font-size: 0.85rem; padding: 14px 5px; }

    .form-row { flex-direction: column; gap: 16px; }

    .phone-dropdown { width: 240px; }

    .banks-grid { grid-template-columns: 1fr; }
    
    .payment-info-box { padding: 16px 14px; }
}

@media (max-width: 480px) {
    .form-container { padding: 0 10px; }
    .tab-btn { font-size: 0.8rem; }
    .hero-title { font-size: 1.45rem !important; }
    .hero-logo-img.white-logo { height: 80px; }
}
