/* ==========================================================================
   FabSoftQuotaPurchase-Page.css
   Core styles for the AI File Pro Quota Purchase page.
   Covers: reset, quota panel, progress bar, price table, GB input, form,
           visual polish, section styling, and responsive layout.

   Color variables: uses --fs-* (fabsoft-variables.css) and --qp-*
   (FabSoftQuotaPurchase-Elevation.css :root) for all brand/semantic colors.
   ========================================================================== */

/* ---------- 1. RESET & BASE ---------- */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: var(--fs-text-dark, #1D1D1F);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ---------- 1b. PAGE-LEVEL OVERRIDES ---------- */

.AIFileProQuotaPurchase_wrapper {
    background: var(--fs-bg-light, #F5F5F7) !important;
}

.AIFileProQuotaPurchase_right {
    background: var(--fs-bg-white, #fff) !important;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06), 0 4px 24px rgba(0,0,0,0.04);
}

.AIFileProQuotaPurchase_rightContent {
    padding: 44px 40px 36px !important;
}

/* Heading hierarchy - modern sans-serif override */
.AIFileProQuotaPurchase_heading {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    font-size: 32px !important;
    font-weight: 700 !important;
    color: var(--fs-text-dark, #1D1D1F) !important;
    letter-spacing: -0.02em;
    margin: 24px 0 6px !important;
}

.AIFileProQuotaPurchase_subheading {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    font-size: 18px !important;
    font-weight: 500 !important;
    color: var(--fs-text-medium, #424245) !important;
    margin: 0 0 8px !important;
}

.AIFileProQuotaPurchase_intro {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    font-size: 15px !important;
    color: var(--fs-text-medium, #424245) !important;
    line-height: 1.65 !important;
    margin-bottom: 8px !important;
}

/* ---------- 1c. SECTION TITLES ---------- */

.AIFileProQuotaPurchase_section-title {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    font-size: 24px !important;
    font-weight: 700 !important;
    color: var(--fs-text-dark, #1D1D1F) !important;
    margin: 44px 0 20px !important;
    padding-bottom: 0;
    border-bottom: none;
    letter-spacing: -0.015em;
}

/* ---------- 1d. FORM FIELD POLISH (Apple-inspired) ---------- */

.AIFileProQuotaPurchase_form-group input,
.AIFileProQuotaPurchase_form-group select {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    font-size: 17px !important;
    padding: 14px 16px !important;
    border: 1px solid #d2d2d7 !important;
    border-radius: 12px !important;
    background: var(--fs-bg-white, #fff) !important;
    color: var(--fs-text-dark, #1D1D1F) !important;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
    width: 100%;
    line-height: 1.35;
}

.AIFileProQuotaPurchase_form-group input:hover,
.AIFileProQuotaPurchase_form-group select:hover {
    border-color: #86868B !important;
}

.AIFileProQuotaPurchase_form-group input:focus,
.AIFileProQuotaPurchase_form-group select:focus {
    outline: none !important;
    border-color: var(--qp-brand, #0071E3) !important;
    box-shadow: 0 0 0 4px var(--qp-brand-light, rgba(0, 113, 227, 0.12)) !important;
}

.AIFileProQuotaPurchase_form-group input::placeholder {
    color: #86868B;
    font-weight: 400;
}

.AIFileProQuotaPurchase_form-group select {
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%2386868B' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 16px center !important;
    background-size: 10px !important;
    padding-right: 40px !important;
}

.AIFileProQuotaPurchase_form-grid--2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px 24px;
}

.AIFileProQuotaPurchase_form-group {
    margin-bottom: 0;
}

/* Phone note text */
.AIFileProQuotaPurchase_note {
    font-size: 13px;
    color: #86868B;
    margin: 6px 0 0 0;
    line-height: 1.5;
}

/* ---------- 1e. CHECKBOX STYLING ---------- */

.AIFileProQuotaPurchase_checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 0;
}

.AIFileProQuotaPurchase_checkbox-group input[type="checkbox"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    margin-top: 1px;
    cursor: pointer;
    flex-shrink: 0;
    border: 1.5px solid #d2d2d7;
    border-radius: 6px;
    background: var(--fs-bg-white, #fff);
    transition: all 0.15s ease;
    position: relative;
}

.AIFileProQuotaPurchase_checkbox-group input[type="checkbox"]:hover {
    border-color: #86868B;
}

.AIFileProQuotaPurchase_checkbox-group input[type="checkbox"]:checked {
    background: var(--qp-brand, #0071E3);
    border-color: var(--qp-brand, #0071E3);
}

.AIFileProQuotaPurchase_checkbox-group input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    top: 4px;
    left: 7px;
    width: 6px;
    height: 11px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.AIFileProQuotaPurchase_checkbox-group input[type="checkbox"]:focus-visible {
    box-shadow: 0 0 0 4px var(--qp-brand-light, rgba(0, 113, 227, 0.12));
    outline: none;
}

.AIFileProQuotaPurchase_checkbox-group label {
    font-size: 15px;
    color: var(--fs-text-dark, #1D1D1F);
    line-height: 1.5;
    cursor: pointer;
}

.AIFileProQuotaPurchase_checkbox-group label a {
    color: var(--qp-brand, #0071E3);
    text-decoration: underline;
    text-decoration-color: var(--qp-brand-light, rgba(0, 113, 227, 0.3));
    text-underline-offset: 2px;
    transition: text-decoration-color 0.2s ease;
}

.AIFileProQuotaPurchase_checkbox-group label a:hover {
    text-decoration-color: var(--qp-brand, #0071E3);
}

/* ---------- 2. QUOTA PANEL (left sidebar) ---------- */

.quota-panel {
    max-width: 500px;
    margin: 0 auto;
}

.quota-panel-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 24px;
}

.quota-icon-wrapper { flex-shrink: 0; }

.quota-warning-text,
.quota-info-text {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: var(--fs-text-dark, #1D1D1F);
    margin: 0;
}

.quota-warning-icon { color: var(--qp-error, #D13438); }
.quota-info-icon { color: var(--qp-accent-info, #0078D4); }

.quota-info-card {
    background: var(--fs-bg-white, #fff);
    border: 1px solid var(--fs-border-light, #E5E5E7);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.quota-info-item { margin-bottom: 16px; }
.quota-info-item:last-child { margin-bottom: 0; }

.quota-info-label {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 11px;
    font-weight: 600;
    color: var(--fs-text-light, #86868B);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 4px;
}

.quota-info-value {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--fs-text-dark, #1D1D1F);
}

.quota-info-value-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.quota-exceeded-badge {
    background: var(--qp-error, #D13438);
    color: white;
    font-size: 10px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.quota-critical { color: var(--qp-error, #D13438) !important; }
.quota-accent { color: var(--qp-accent-info, #0078D4) !important; }
.quota-up-icon { flex-shrink: 0; }

.quota-separator {
    height: 1px;
    background: var(--fs-border-light, #E5E5E7);
    margin: 16px 0;
}

/* ---------- 3. QUOTA PROGRESS BAR ---------- */

.quota-progress-section { margin-bottom: 24px; }
.quota-progress-bar-wrapper { margin: 8px 0; }

.quota-progress-bar {
    width: 100%;
    height: 10px;
    background: var(--fs-border-light, #E5E5E7);
    border-radius: 5px;
    border: none;
    overflow: hidden;
}

.quota-progress-fill {
    height: 100%;
    border-radius: 5px;
    transition: width 0.4s ease;
}

.quota-progress-exceeded { background: linear-gradient(90deg, #e57373, var(--qp-error, #D13438)); }

.quota-progress-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 6px;
}

.quota-progress-label-left,
.quota-progress-label-right {
    font-size: 12px;
    color: var(--fs-text-light, #86868B);
}

.quota-progress-label-right {
    color: var(--qp-error, #D13438);
    font-weight: 600;
}

/* ---------- 4. PRICE TABLE ---------- */

.AIFileProQuotaPurchase_header {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    letter-spacing: 0.01em;
    border-radius: 10px 10px 0 0;
    text-align: center;
    background: var(--qp-brand, #0071E3) !important;
    color: #fff !important;
}

.AIFileProQuotaPurchase_purchaseContainer {
    border: 1.5px solid var(--fs-border-light, #E5E5E7);
    border-radius: 10px;
    overflow: hidden;
    background: var(--fs-bg-white, #fff);
}

.price-break-table {
    width: 100%;
    margin: 0;
    border-collapse: collapse;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 14px;
}

.price-break-table th,
.price-break-table td {
    padding: 13px 16px;
    text-align: left;
    border: none;
    border-bottom: 1px solid var(--fs-border-light, #E5E5E7);
}

.price-break-table th {
    background: var(--fs-bg-lighter, #FAFAFA);
    font-weight: 600;
    color: var(--fs-text-medium, #424245);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.price-break-table tbody tr {
    transition: background-color 0.15s ease;
}

.price-break-table tbody tr:hover {
    background-color: var(--fs-bg-lighter, #FAFAFA);
}

.price-break-table tbody tr:last-child td {
    border-bottom: none;
}

.price-break-table .best-value {
    background: var(--qp-brand, #0071E3) !important;
    color: #fff;
    font-weight: 600;
}

.price-break-table .best-value:hover {
    background: var(--qp-brand-hover, #0077ED) !important;
}

.price-break-table .best-value td {
    border-bottom-color: rgba(255,255,255,0.15);
}

/* ---------- 5. CURRENT RATE DISPLAY ---------- */

.current-rate-display {
    background: var(--qp-brand-light, rgba(0, 113, 227, 0.1));
    border-left: 4px solid var(--qp-brand, #0071E3);
    padding: 14px 16px;
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: var(--fs-text-dark, #1D1D1F);
    border-radius: 0;
}

.current-rate-display.best-price {
    background: rgba(46, 125, 50, 0.06);
    border-left-color: var(--qp-success, #2e7d32);
    color: var(--qp-success-dark, #1b5e20);
}

/* ---------- 6. GB INPUT ---------- */

.gb-input-container {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0;
    padding: 20px 16px;
    background: var(--fs-bg-lighter, #FAFAFA);
    border-top: 1px solid var(--fs-border-light, #E5E5E7);
}

.gb-input {
    width: 110px;
    padding: 10px 14px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 18px;
    font-weight: 600;
    border: 2px solid var(--fs-border-light, #E5E5E7);
    border-radius: 8px;
    text-align: center;
    background: var(--fs-bg-white, #fff);
    color: var(--fs-text-dark, #1D1D1F);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.gb-input:focus {
    outline: none;
    border-color: var(--qp-brand, #0071E3);
    box-shadow: 0 0 0 3px var(--qp-brand-light, rgba(0, 113, 227, 0.12));
}

.gb-label {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: var(--fs-text-dark, #1D1D1F);
    margin-left: 0;
}

/* ---------- 6b. ORDER SUMMARY FOOTER ---------- */

.AIFileProQuotaPurchase_footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px !important;
    margin: 0 !important;
    background: var(--fs-bg-lighter, #FAFAFA);
    border-top: 1.5px solid var(--fs-border-light, #E5E5E7);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: var(--fs-text-medium, #424245) !important;
}

.AIFileProQuotaPurchase_footer div:last-child {
    font-size: 16px;
    font-weight: 700;
    color: var(--qp-brand, #0071E3);
}

/* Override site-wide style.css navy colors */
.AIFileProQuotaPurchase_footer span {
    color: var(--qp-brand, #0071E3) !important;
}

.AIFileProQuotaPurchase_price {
    color: var(--qp-brand, #0071E3) !important;
}

.AIFileProQuotaPurchase_btn {
    background: var(--qp-brand, #0071E3) !important;
    border-radius: 980px !important;
}

/* ---------- 7. FORM LABELS ---------- */

.qp-field-label {
    display: block;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: var(--fs-text-dark, #1D1D1F);
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}

.qp-field-label .qp-required {
    color: var(--qp-error, #D13438);
    margin-left: 1px;
    font-weight: 500;
}

/* ---------- 8. SUBMIT BUTTON ---------- */

.AIFileProQuotaPurchase_submit {
    display: block;
    width: 100%;
    max-width: 420px;
    margin: 20px auto 0 auto;
    padding: 16px 32px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 17px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(180deg, var(--qp-success-light, #35913a) 0%, var(--qp-success, #2e7d32) 100%);
    border: none;
    border-radius: 980px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
    letter-spacing: 0.01em;
    box-shadow: 0 2px 8px var(--qp-success-shadow, rgba(46, 125, 50, 0.25));
}

.AIFileProQuotaPurchase_submit:hover {
    background: linear-gradient(180deg, var(--qp-success-hover, #3ea344) 0%, var(--qp-success, #2e7d32) 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(46, 125, 50, 0.3);
}

.AIFileProQuotaPurchase_submit:active {
    background: var(--qp-success-dark, #1b5e20);
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(46, 125, 50, 0.2);
}

.AIFileProQuotaPurchase_submit:disabled {
    background: #b0bec5;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

.qp-submit-reassurance {
    text-align: center;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 12.5px;
    color: var(--fs-text-light, #86868B);
    margin-top: 12px;
    line-height: 1.5;
}

.qp-submit-reassurance svg {
    width: 14px;
    height: 14px;
    vertical-align: -2px;
    margin-right: 3px;
    color: var(--qp-success, #2e7d32);
}

/* ---------- 9. TOS MODAL ---------- */

.qp-tos-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.qp-tos-overlay.qp-tos-open {
    display: flex;
}

.qp-tos-modal {
    background: var(--fs-bg-white, #fff);
    border-radius: 14px;
    width: 90%;
    max-width: 700px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.2);
}

.qp-tos-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--fs-border-light, #E5E5E7);
}

.qp-tos-header h4 {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--fs-text-dark, #1D1D1F);
    margin: 0;
}

.qp-tos-close {
    background: var(--fs-bg-light, #F5F5F7);
    border: none;
    font-size: 20px;
    color: var(--fs-text-medium, #424245);
    cursor: pointer;
    line-height: 1;
    padding: 4px 10px;
    border-radius: 6px;
    transition: background 0.15s ease;
}

.qp-tos-close:hover {
    background: var(--fs-border-light, #E5E5E7);
    color: var(--fs-text-dark, #1D1D1F);
}

.qp-tos-body {
    padding: 24px;
    overflow-y: auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 13px;
    line-height: 1.7;
    color: var(--fs-text-medium, #424245);
    white-space: pre-wrap;
}

/* ---------- 10. CC IMAGES ---------- */

.AIFileProQuotaPurchase_CcImgs {
    display: flex;
    align-items: center;
    gap: 6px;
}

.AIFileProQuotaPurchase_CcImgs img {
    border-radius: 4px;
    opacity: 0.85;
    transition: opacity 0.2s ease;
}

.AIFileProQuotaPurchase_CcImgs img:hover {
    opacity: 1;
}

/* ---------- 11. ERROR LABEL ---------- */

.yourprofile-Error {
    display: block;
    background: #fef2f2;
    border: 1px solid #fca5a5;
    border-radius: 8px;
    color: #b91c1c;
    padding: 12px 16px !important;
    margin: 12px 0 !important;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
}

/* ---------- 12. RESPONSIVE ---------- */

@media (max-width: 768px) {
    .AIFileProQuotaPurchase_rightContent {
        padding: 28px 20px 24px !important;
    }

    .AIFileProQuotaPurchase_heading {
        font-size: 26px !important;
    }

    .AIFileProQuotaPurchase_section-title {
        font-size: 19px !important;
        margin: 28px 0 6px !important;
    }

    .AIFileProQuotaPurchase_form-grid--2 {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }

    .price-break-table {
        font-size: 13px;
    }

    .price-break-table th,
    .price-break-table td {
        padding: 10px 10px;
    }

    .gb-input-container {
        flex-direction: column;
        align-items: flex-start;
        padding: 16px 12px;
    }

    .gb-label {
        margin-left: 0;
    }

    .AIFileProQuotaPurchase_submit {
        max-width: 100%;
        font-size: 16px;
    }

    .qp-tos-modal {
        width: 95%;
        max-height: 90vh;
        border-radius: 12px;
    }

    .AIFileProQuotaPurchase_footer {
        flex-direction: column;
        gap: 6px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .AIFileProQuotaPurchase_heading {
        font-size: 24px !important;
    }

    .price-break-table {
        font-size: 12px;
    }

    .price-break-table th,
    .price-break-table td {
        padding: 8px 8px;
    }

    .AIFileProQuotaPurchase_CcImgs img {
        width: 48px !important;
    }
}

/* ---------- 13. HIDDEN UTILITY ---------- */

.qp-hidden { display: none !important; }

/* ---------- 14. COLOR UTILITY CLASSES ---------- */

.qp-color-danger { color: var(--qp-error, #D13438) !important; }
.qp-color-success { color: var(--qp-success, #2e7d32) !important; }
.qp-color-default { color: var(--fs-text-dark, #1D1D1F) !important; }

/* ---------- 15. SUBMIT PROCESSING STATE ---------- */

.qp-submit-processing {
    opacity: 0.7;
    pointer-events: none;
}

.qp-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: qp-spin 0.6s linear infinite;
    vertical-align: -2px;
    margin-right: 6px;
}

@keyframes qp-spin {
    to { transform: rotate(360deg); }
}

/* ---------- 16. PROGRESS FULL STATE ---------- */

.qp-progress-full {
    width: 100%;
}