/* SCILLAN Pre-Checkout & Universal Intake Styles v2.20 (Fully Responsive) */

#scillan-checkout-wrapper {
    --navy: #14263D;
    --navy-soft: #2C4059;
    --gold: #B4935A;
    --gold-soft: #D8C4A0;
    --ivory: #F7F3EB;
    --parchment: #FBF8F2;
    --slate: #626B73;
    --line: #E7E1D6;
    --green: #2E7D32;
    --red: #C0392B;
    --white: #FFFFFF;
    --radius-lg: 18px;
    --radius-md: 10px;
    --radius-sm: 7px;

    max-width: 1100px;
    margin: 0 auto;
    padding: 30px 20px 80px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--navy);
    background: var(--ivory);
    box-sizing: border-box;
    width: 100%;
}

#scillan-checkout-wrapper *,
#scillan-checkout-wrapper *::before,
#scillan-checkout-wrapper *::after {
    box-sizing: border-box;
}

.scillan-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--gold);
    flex-wrap: wrap;
    gap: 10px;
}

.scillan-topbar .brand-mark {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--navy);
}

.scillan-topbar .topbar-subtitle {
    font-size: 14px;
    font-weight: 600;
    color: var(--slate);
}

.scillan-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: 0 2px 8px rgba(20, 38, 61, .06);
    margin-bottom: 25px;
    overflow: hidden;
    width: 100%;
}

.scillan-card .card-head {
    padding: 20px 25px;
    border-bottom: 1px solid var(--line);
    background: var(--parchment);
}

.scillan-card .card-head h2 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--navy);
    margin: 0 0 4px 0;
}

.scillan-card .card-head p {
    font-size: 14px;
    color: var(--slate);
    margin: 0;
}

.scillan-card .card-body {
    padding: 25px;
}

.field-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
    width: 100%;
}

.field {
    flex: 1 1 220px;
    min-width: 0;
    width: 100%;
}

.field.full {
    flex: 0 0 100%;
    width: 100%;
}

.field label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: var(--navy);
    margin-bottom: 6px;
}

.field label .req {
    color: var(--gold);
    margin-left: 2px;
}

.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field input[type="date"],
.field select {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--line);
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-family: inherit;
    color: var(--navy);
    background: var(--white);
    transition: border-color .2s ease, box-shadow .2s ease;
    box-sizing: border-box;
}

.field input:focus,
.field select:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(180, 147, 90, .12);
}

.conditional-block {
    background: #fbf8f2;
    padding: 18px;
    border-radius: 8px;
    border-left: 4px solid var(--gold);
    margin-bottom: 15px;
    width: 100%;
}

.conditional-block h4 {
    margin-top: 0;
    color: var(--navy);
    font-size: 16px;
    margin-bottom: 12px;
}

/* Actions & Button Formatting */
.actions {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    justify-content: center;
    padding: 14px 28px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    font-size: 15px;
    transition: all .2s ease;
    text-decoration: none;
}

.btn-primary {
    background: var(--navy);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--navy-soft);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(20, 38, 61, .18);
}

/* Responsive Table Wrapper for My Account */
.scillan-my-entities-portal table {
    width: 100%;
    border-collapse: collapse;
}

.scillan-my-entities-portal {
    overflow-x: auto;
}

/* ============================================================
   TABLET & MOBILE BREAKPOINTS (v2.18 Responsive Rules)
   ============================================================ */

/* Tablet View (Max Width: 900px) */
@media (max-width: 900px) {
    #scillan-checkout-wrapper {
        padding: 22px 16px 60px;
    }

    .scillan-card .card-head {
        padding: 18px 20px;
    }

    .scillan-card .card-body {
        padding: 20px;
    }
}

/* Mobile View (Max Width: 768px) */
@media (max-width: 768px) {
    #scillan-checkout-wrapper {
        padding: 18px 12px 50px;
        border-radius: 0;
    }

    .scillan-topbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .scillan-topbar .brand-mark {
        font-size: 22px;
    }

    .field-row {
        flex-direction: column;
        gap: 12px;
        margin-bottom: 12px;
    }

    .field {
        flex: 1 1 100%;
        min-width: 100%;
        width: 100%;
    }

    .field input[type="text"],
    .field input[type="email"],
    .field input[type="tel"],
    .field input[type="date"],
    .field select {
        font-size: 16px; /* Prevents iOS auto-zoom on input focus */
        padding: 12px;
    }

    .actions {
        flex-direction: column-reverse;
        gap: 10px;
    }

    .btn {
        width: 100%;
        padding: 15px 20px;
        font-size: 16px;
    }

    .conditional-block {
        padding: 14px;
    }

    .scillan-product-entity-selector {
        padding: 12px !important;
    }
}

/* Small Mobile View (Max Width: 480px) */
@media (max-width: 480px) {
    #scillan-checkout-wrapper {
        padding: 12px 8px 40px;
    }

    .scillan-card {
        border-radius: var(--radius-md);
        margin-bottom: 16px;
    }

    .scillan-card .card-head h2 {
        font-size: 19px;
    }

    .scillan-card .card-body {
        padding: 16px 14px;
    }
}


/* ===== Sections A-D typography: headings Cormorant Garamond 30px, body Poppins 14px ===== */
#scillan-checkout-wrapper .scillan-abcd .card-head h2,
#scillan-checkout-wrapper .scillan-abcd .card-head h3 {
    font-family: 'Cormorant Garamond', Georgia, serif !important;
    font-size: 30px !important;
    font-weight: 700;
    line-height: 1.2;
    color: var(--navy);
    margin: 0 0 4px 0;
}

#scillan-checkout-wrapper .scillan-abcd .card-head p,
#scillan-checkout-wrapper .scillan-abcd .card-body,
#scillan-checkout-wrapper .scillan-abcd .card-body p,
#scillan-checkout-wrapper .scillan-abcd .card-body span,
#scillan-checkout-wrapper .scillan-abcd .card-body label,
#scillan-checkout-wrapper .scillan-abcd .card-body strong,
#scillan-checkout-wrapper .scillan-abcd .card-body h4,
#scillan-checkout-wrapper .scillan-abcd .field label,
#scillan-checkout-wrapper .scillan-abcd .field input,
#scillan-checkout-wrapper .scillan-abcd .field select,
#scillan-checkout-wrapper .scillan-abcd .field textarea {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    font-size: 14px !important;
}


/* ===== v2.20.9 Mobile layout fixes ===== */
.scillan-remove-item {
    display: inline-block;
    padding: 6px 0;
}

@media (max-width: 768px) {
    /* Stay inside the page's own card: no second beige box, minimal padding */
    #scillan-checkout-wrapper {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        left: auto;
        right: auto;
        background: transparent !important;
        padding: 0 0 12px !important;
        border-radius: 0;
    }

    #scillan-checkout-wrapper .scillan-card .card-head {
        padding: 14px 16px;
    }

    #scillan-checkout-wrapper .scillan-card .card-body {
        padding: 16px 14px;
    }

    /* Cart rows: item details use the full width, price sits top-right */
    #scillan-checkout-wrapper .cart-item-row {
        position: relative;
        display: block !important;
    }

    #scillan-checkout-wrapper .cart-item-row > div:first-child {
        width: 100%;
    }

    #scillan-checkout-wrapper .cart-item-row > div:first-child > strong {
        display: inline-block;
        max-width: calc(100% - 96px);
        line-height: 1.3;
    }

    #scillan-checkout-wrapper .cart-item-row > div:last-child {
        position: absolute !important;
        top: 12px;
        right: 0;
        min-width: 0 !important;
        margin: 0 !important;
    }

    /* "Starter Bundle Includes" box: full width, tighter text */
    #scillan-checkout-wrapper .bundle-details {
        width: 100%;
        max-width: 100%;
        padding: 10px 12px !important;
        font-size: 12.5px !important;
        line-height: 1.5;
    }

    #scillan-checkout-wrapper .bundle-details ul {
        padding-left: 16px !important;
    }

    /* Fee rows: label can wrap, amount stays on one line */
    #scillan-checkout-wrapper .fee-item-row {
        gap: 8px;
        font-size: 13px !important;
        line-height: 1.45;
    }

    /* Section D option rows */
    #scillan-checkout-wrapper .scillan-section-d-body label {
        gap: 10px !important;
    }
}

@media (max-width: 600px) {
    /* Sections A-D headings: smaller on phones so they don't wrap into 3 lines */
    #scillan-checkout-wrapper .scillan-abcd .card-head h2,
    #scillan-checkout-wrapper .scillan-abcd .card-head h3 {
        font-size: 24px !important;
    }
}


/* ===== v2.20.12 field fixes: select text no longer clipped ===== */
#scillan-checkout-wrapper .scillan-abcd .field select,
#scillan-checkout-wrapper .scillan-abcd .field input[type="text"],
#scillan-checkout-wrapper .scillan-abcd .field input[type="email"],
#scillan-checkout-wrapper .scillan-abcd .field input[type="tel"],
#scillan-checkout-wrapper .scillan-abcd .field input[type="date"] {
    height: auto !important;
    min-height: 46px;
    line-height: 1.4 !important;
    padding-top: 10px !important;
    padding-bottom: 10px !important;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    #scillan-checkout-wrapper .scillan-card {
        margin-left: 0;
        margin-right: 0;
    }
    #scillan-checkout-wrapper .btn-primary,
    #scillan-checkout-wrapper .actions button {
        width: 100%;
        font-size: 15px !important;
        padding: 14px 18px !important;
    }
}

/* v2.22 service question sets */
#scillan-checkout-wrapper .service-block { margin-bottom: 22px; }
#scillan-checkout-wrapper .service-block h4 { margin: 0 0 10px; color: #14263D; }
#scillan-checkout-wrapper .field-help { display: block; margin-top: 4px; font-size: 12.5px; color: #626B73; line-height: 1.45; }
#scillan-checkout-wrapper .service-note { margin: 0 0 12px; padding: 10px 12px; background: #fbf8f2; border-left: 3px solid #b4935a; border-radius: 4px; font-size: 13px; color: #2C4059; line-height: 1.5; }
#scillan-checkout-wrapper .service-note--warn { background: #fff4e5; border-left-color: #d48a1f; }
#scillan-checkout-wrapper .service-note--tip { background: #f2f6fb; border-left-color: #14263D; }
#scillan-checkout-wrapper .multi-checks { display: flex; flex-wrap: wrap; gap: 8px 16px; padding: 4px 0; }
#scillan-checkout-wrapper .multi-checks.err { outline: 1px solid #c0392b; outline-offset: 4px; border-radius: 4px; }
#scillan-checkout-wrapper .multi-check { display: flex; align-items: center; gap: 6px; font-weight: 400; cursor: pointer; }
#scillan-checkout-wrapper .agreement-label { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; margin-bottom: 12px; line-height: 1.5; }
#scillan-checkout-wrapper .agreement-label input { margin-top: 4px; flex-shrink: 0; }
#scillan-checkout-wrapper .agreement-label a { color: #b4935a; text-decoration: underline; }
#scillan-checkout-wrapper .confirm-field { font-weight: 500; }
#scillan-checkout-wrapper .scillan-notice-box { margin: 0 0 18px; padding: 14px 16px; background: #fff8e1; border-left: 4px solid #b4935a; border-radius: 6px; font-size: 14px; color: #2C4059; line-height: 1.55; }
#scillan-checkout-wrapper textarea { width: 100%; box-sizing: border-box; }
@media (max-width: 640px) {
  #scillan-checkout-wrapper .multi-checks { flex-direction: column; }
}
