/* ==========================================
   STAR OVERSEAS ENQUIRY SYSTEM STYLES
   ========================================== */

:root {
    --primary-blue: #0046ad;
    --primary-dark: #003380;
    --brand-navy: #0f172a;
    --text-muted: #64748b;
    --bg-surface: #f8fafc;
    --border-light: #e2e8f0;
    --error-red: #ef4444;
    --success-green: #10b981;
}

body.enquiry-page-body {
    margin: 0;
    padding: 0;
    font-family: 'Manrope', sans-serif;
    background: linear-gradient(135deg, #f0f7ff 0%, #f8fafc 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* TOP HEADER */
.enquiry-brand-header {
    width: 100%;
    background: #ffffff;
    border-bottom: 1px solid var(--border-light);
    padding: 14px 5%;
    box-sizing: border-box;
}

.brand-header-container {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand-logo-img {
    height: 42px;
    object-fit: contain;
}

.brand-badge-right {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary-blue);
    background: #eef4ff;
    padding: 8px 16px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* FIXED CARD CONTAINER & FOOTER PINNING */
.enquiry-portal-wrapper {
    width: 100%;
    max-width: 820px;
    margin: 24px auto 30px;
    padding: 0 16px;
    box-sizing: border-box;
}

.enquiry-card {
    background: #ffffff;
    border-radius: 28px;
    border: 1px solid var(--border-light);
    box-shadow: 0 20px 50px rgba(0, 70, 173, 0.07);
    padding: 28px 36px 24px;
    display: flex;
    flex-direction: column;
    height: 620px;
    /* Fixed Container Height */
    position: relative;
    box-sizing: border-box;
}

/* CARD HEADER & PROGRESS */
.enquiry-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 14px;
    margin-bottom: 16px;
}

.brand-back-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.step-progress-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.progress-bar-track {
    width: 180px;
    height: 8px;
    background: #e2e8f0;
    border-radius: 20px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: var(--primary-blue);
    border-radius: 20px;
    transition: width 0.35s ease;
}

.step-counter-text {
    font-size: 12px;
    font-weight: 800;
    color: var(--primary-blue);
}

/* VIEWPORT & SCROLL AREA */
#starEnquiryForm {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

.enquiry-viewport {
    flex: 1;
    overflow-y: auto;
    padding-right: 4px;
}

.enquiry-step {
    display: none;
    flex-direction: column;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.enquiry-step.active {
    display: flex;
    opacity: 1;
}

.step-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--brand-navy);
    margin: 0 0 4px 0;
}

.step-desc {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0 0 18px 0;
}

/* UNIFIED CHOICE CARDS & TYPOGRAPHY */
.options-grid-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.options-grid-3col {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.not-sure-option-row {
    margin-top: 14px;
}

.choice-card,
.choice-card-checkbox {
    cursor: pointer;
    position: relative;
}

.choice-card input,
.choice-card-checkbox input {
    position: absolute;
    opacity: 0;
}

.choice-box,
.choice-box-mini,
.choice-box-strip {
    background: #f8fafc;
    border: 1.5px solid var(--border-light);
    border-radius: 16px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s ease;
}

/* Strict Vertical Column for Title & Description */
.choice-text-col {
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: left;
}

.choice-box strong {
    font-size: 14px;
    font-weight: 700;
    color: var(--brand-navy);
    line-height: 1.3;
}

.choice-box span {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    line-height: 1.3;
}

.mini-card {
    padding: 10px 14px;
    justify-content: center;
}

.choice-box-mini {
    padding: 12px;
    justify-content: center;
}

.choice-box-mini img {
    width: 22px;
    height: 15px;
    border-radius: 2px;
}

.choice-card input:checked+.choice-box,
.choice-card-checkbox input:checked+.choice-box,
.choice-card-checkbox input:checked+.choice-box-mini,
.choice-card-checkbox input:checked+.choice-box-strip {
    background: #eef4ff;
    border-color: var(--primary-blue);
    color: var(--primary-blue);
}

.choice-card input:checked+.choice-box strong {
    color: var(--primary-blue);
}

.choice-icon {
    font-size: 20px;
    color: var(--primary-blue);
    flex-shrink: 0;
}

/* CUSTOM DROPDOWN ENGINE */
.custom-dropdown-container {
    position: relative;
    width: 100%;
}

.custom-select-trigger {
    background: #ffffff;
    border: 1.5px solid var(--border-light);
    border-radius: 14px;
    padding: 14px 20px;
    font-size: 14px;
    font-weight: 700;
    color: var(--brand-navy);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.custom-select-trigger:hover {
    border-color: var(--primary-blue);
    box-shadow: none;
}

.dropdown-arrow-icon {
    font-size: 12px;
    color: #64748b;
    margin-left: 12px;
}

.custom-dropdown-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    width: 100%;
    background: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    z-index: 100;
    overflow: hidden;
}

.custom-dropdown-menu.hidden {
    display: none;
}

.dropdown-search-box {
    padding: 10px;
    border-bottom: 1px solid #f1f5f9;
}

.dropdown-search-box input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-light);
    border-radius: 10px;
    font-size: 13px;
    outline: none;
    box-sizing: border-box;
}

.dropdown-options-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 200px;
    overflow-y: auto;
}

.dropdown-options-list li {
    padding: 12px 20px;
    font-size: 13px;
    font-weight: 600;
    color: var(--brand-navy);
    cursor: pointer;
}

.dropdown-options-list li:hover {
    background: #f1f5f9;
    color: var(--primary-blue);
}

/* INPUTS STACK */
.form-fields-stack {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.input-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--brand-navy);
}

.standard-text-input {
    width: 100%;
    background: #ffffff;
    border: 1.5px solid var(--border-light);
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 14px;
    color: var(--brand-navy);
    outline: none;
    box-sizing: border-box;
}

.phone-input-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.country-code-selector {
    display: flex;
    align-items: center;
    background: #f8fafc;
    border: 1.5px solid var(--border-light);
    border-radius: 12px;
    padding: 0 12px;
    height: 48px;
}

.mini-flag-icon {
    width: 20px;
    height: 14px;
    border-radius: 2px;
    margin-right: 6px;
}

.code-select-native {
    background: transparent;
    border: none;
    font-size: 13px;
    font-weight: 700;
    outline: none;
}

.phone-field {
    height: 48px;
}

.field-error-msg {
    color: var(--error-red);
    font-size: 12px;
    font-weight: 700;
    margin-top: 8px;
    display: block;
}

/* RESTORED SUMMARY TABLE GRID */
.review-summary-table-box {
    background: #f8fafc;
    border: 1px solid var(--border-light);
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 14px;
}

.summary-data-table {
    width: 100%;
    border-collapse: collapse;
}

.summary-data-table td {
    padding: 12px 16px;
    font-size: 13px;
    border-bottom: 1px solid #e2e8f0;
}

.summary-data-table tr:last-child td {
    border-bottom: none;
}

.summary-label-td {
    color: var(--text-muted);
    font-weight: 600;
    width: 35%;
}

.summary-val-td {
    color: var(--brand-navy);
    font-weight: 800;
    width: 65%;
}

.consent-checkbox-stack {
    margin-top: 6px;
}

.checkbox-inline {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.45;
}

/* FIXED BOTTOM CONTROLS FOOTER */
.enquiry-controls-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #f1f5f9;
    padding-top: 18px;
    margin-top: auto;
    /* Absolute Bottom Stick */
    background: #ffffff;
}

.btn-step-prev,
.btn-step-next,
.btn-step-submit {
    padding: 12px 28px;
    border-radius: 40px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    border: none;
}

.btn-step-prev {
    background: #f1f5f9;
    color: var(--brand-navy);
}

.btn-step-next,
.btn-step-submit {
    background: var(--primary-blue);
    color: #ffffff;
}

.hidden {
    display: none !important;
}

/* ==========================================
   STEP 16 CONFIRMATION BASE STYLES
   ========================================== */
.confirmation-success-box {
    text-align: center;
    padding: 24px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.success-icon-badge {
    font-size: 56px;
    color: var(--success-green);
    margin-bottom: 16px;
}

.success-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--brand-navy);
    margin: 0 0 10px;
}

.success-desc {
    font-size: 14px;
    color: var(--text-muted);
    max-width: 520px;
    margin: 0 auto 20px;
    line-height: 1.6;
}

.next-steps-info-card {
    background: #f8fafc;
    border: 1px solid var(--border-light);
    border-radius: 18px;
    padding: 20px;
    text-align: left;
    max-width: 520px;
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 24px;
}

.next-steps-info-card h4 {
    margin: 0 0 10px;
    font-size: 15px;
    font-weight: 700;
    color: var(--brand-navy);
}

.next-steps-info-card ul {
    margin: 0;
    padding-left: 20px;
    color: var(--text-muted);
    font-size: 13.5px;
    line-height: 1.6;
}

.confirmation-cta-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
    max-width: 520px;
}

.btn-return-home,
.btn-whatsapp-direct {
    padding: 12px 24px;
    border-radius: 40px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.btn-return-home {
    background: #f1f5f9;
    color: var(--brand-navy);
}

.btn-whatsapp-direct {
    background: #25d366;
    color: #ffffff;
}

/* ==========================================
   MOBILE RESPONSIVENESS (MAX-WIDTH: 767PX)
   Mobile App Card Container & Pinned Actions
   ========================================== */
@media (max-width: 767px) {
    body.enquiry-page-body {
        min-height: 100dvh;
    }

    /* Compact Top Header */
    .enquiry-brand-header {
        padding: 10px 16px;
        flex-shrink: 0;
    }

    .brand-header-container {
        gap: 10px;
    }

    .brand-logo-img {
        height: 32px;
    }

    .brand-badge-right {
        font-size: 11.5px;
        padding: 5px 10px;
        border-radius: 20px;
        white-space: nowrap;
    }

    /* Card Wrapper with Clean 12px Outer Margin */
    .enquiry-portal-wrapper {
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 12px;
        box-sizing: border-box;
        flex: 1;
        display: flex;
        flex-direction: column;
        min-height: 0;
    }

    /* White Card Wrapper with Rounded Corners & Soft Elevation */
    .enquiry-card {
        background: #ffffff;
        border-radius: 22px;
        border: 1px solid #e2e8f0;
        box-shadow: 0 10px 30px rgba(0, 70, 173, 0.08);
        margin: 0;
        padding: 20px 18px 16px;
        height: calc(100dvh - 84px);
        max-height: calc(100dvh - 84px);
        min-height: 0;
        display: flex;
        flex-direction: column;
        box-sizing: border-box;
        position: relative;
    }

    /* Compact Card Header & Progress Track */
    .enquiry-card-header {
        padding-bottom: 12px;
        margin-bottom: 14px;
        flex-shrink: 0;
    }

    .brand-back-link {
        gap: 6px;
    }

    .progress-bar-track {
        width: 100px;
        height: 6px;
    }

    .step-counter-text {
        white-space: nowrap;
    }

    /* Viewport: Smooth Vertical Scrolling inside Card, No Horizontal Scroll */
    .enquiry-viewport {
        flex: 1;
        min-height: 0;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch;
        padding-right: 4px;
        padding-bottom: 8px;
    }

    /* Single-Column Stacked Cards Across All Steps */
    .options-grid-2col,
    .options-grid-3col {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    .choice-card,
    .choice-card-checkbox {
        width: 100%;
    }

    .choice-box,
    .choice-box-mini,
    .choice-box-strip {
        width: 100%;
        box-sizing: border-box;
    }

    .choice-box-mini,
    .mini-card {
        justify-content: flex-start;
        padding: 14px 16px;
    }

    /* Form Fields & Dropdowns */
    .form-fields-stack {
        gap: 14px;
    }

    .standard-text-input,
    .custom-select-trigger {
        padding: 12px 14px;
    }

    /* Review Step 15 Table */
    .summary-data-table td {
        padding: 10px 12px;
    }

    .summary-label-td {
        width: 38%;
    }

    .summary-val-td {
        width: 62%;
    }

    /* Bottom Action Bar Pinned Neatly Inside Bottom of Card */
    .enquiry-controls-footer {
        position: static;
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-top: 1px solid #f1f5f9;
        padding-top: 14px;
        padding-bottom: 0;
        margin-top: auto;
        background: #ffffff;
        box-shadow: none;
        gap: 12px;
        flex-shrink: 0;
        box-sizing: border-box;
    }

    .btn-step-prev,
    .btn-step-next,
    .btn-step-submit {
        height: 48px;
        min-height: 48px;
        border-radius: 999px;
        padding: 0 20px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        box-sizing: border-box;
        touch-action: manipulation;
    }

    .btn-step-prev {
        flex: 1;
        max-width: 110px;
        background: #f1f5f9;
        color: var(--brand-navy);
    }

    .btn-step-prev:disabled {
        opacity: 0.45;
        cursor: not-allowed;
    }

    .btn-step-next,
    .btn-step-submit {
        flex: 2;
        background: var(--primary-blue);
        color: #ffffff;
    }

    /* Confirmation Step 16 */
    .confirmation-cta-actions {
        flex-direction: column;
        gap: 10px;
    }

    .btn-return-home,
    .btn-whatsapp-direct {
        width: 100%;
        box-sizing: border-box;
        height: 48px;
    }
}

/* ==========================================
   ENSURE .HIDDEN ALWAYS WINS UNCONDITIONALLY
   ========================================== */
.hidden,
.btn-step-submit.hidden,
.btn-step-next.hidden,
.btn-step-prev.hidden,
.enquiry-controls-footer.hidden,
[hidden] {
    display: none !important;
}
