/**
 * GCE Pricing Page
 *
 * Palette: navy for structure and reliability (headings, prices,
 * toggle, non-emphasized borders), green for action and "good
 * choice" signalling (CTAs, checkmarks, the featured card's
 * highlight, savings badges), amber used ONLY for the Premium
 * "best value" badge and icon — restrained, not scattered.
 *
 * All colours run through --gce-* custom properties specifically
 * so a future dark-mode pass is a second palette, not a rewrite.
 */

.gce-pricing,
.gce-modal-overlay {
    --gce-ink:          #14213D;
    --gce-ink-soft:     #5C6B7A;
    --gce-primary:      #1E4D8B;
    --gce-primary-deep: #143766;
    --gce-success:      #1E8449;
    --gce-success-deep: #166638;
    --gce-success-soft: #E8F5EC;
    --gce-accent:       #D4A017;
    --gce-accent-soft:  #FDF3DC;
    --gce-surface:      #FFFFFF;
    --gce-paper:        #F5F8FB;
    --gce-border:       #DCE3EA;
    --gce-error:        #B3261E;

    --gce-font-display: Georgia, 'Iowan Old Style', 'Palatino Linotype', 'URW Palladio L', serif;
    --gce-font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --gce-font-mono: ui-monospace, 'SF Mono', 'Cascadia Mono', 'Segoe UI Mono', Consolas, monospace;
}

.gce-pricing {
    max-width: 1080px;
    margin: 0 auto;
    padding: 40px 20px 64px;
    font-family: var(--gce-font-body);
    color: var(--gce-ink);
    -webkit-font-smoothing: antialiased;
}

/* ============================================================
   HEADER
   ============================================================ */
.gce-pricing-header {
    text-align: center;
    max-width: 560px;
    margin: 0 auto 28px;
}

.gce-pricing-header h1 {
    font-family: var(--gce-font-display);
    font-size: 30px;
    color: var(--gce-ink);
    margin: 0 0 10px;
}

.gce-pricing-header p {
    font-size: 15px;
    color: var(--gce-ink-soft);
    margin: 0;
    line-height: 1.5;
}

/* ============================================================
   LEVEL TOGGLE
   ============================================================ */
.gce-level-toggle-wrap {
    text-align: center;
    margin-bottom: 32px;
}

.gce-level-toggle-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--gce-ink);
    margin-bottom: 12px;
}

.gce-level-toggle {
    display: inline-flex;
    gap: 0;
    border: 2px solid var(--gce-primary);
    border-radius: 999px;
    padding: 4px;
    background: var(--gce-surface);
}

.gce-level-btn {
    min-width: 96px;
    border: none;
    background: transparent;
    color: var(--gce-primary);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.03em;
    padding: 10px 24px;
    border-radius: 999px;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.gce-level-btn.is-active {
    background: var(--gce-primary);
    color: var(--gce-surface);
}

.gce-level-btn:not(.is-active):hover {
    background: var(--gce-paper);
}

.gce-level-btn:focus-visible {
    outline: 2px solid var(--gce-primary);
    outline-offset: 2px;
}

/* ============================================================
   PLAN GRID
   ============================================================ */
.gce-plan-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

.gce-plan-grid[hidden] {
    display: none;
}

@media (max-width: 900px) {
    .gce-plan-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 560px) {
    .gce-plan-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   PLAN CARD
   ============================================================ */
.gce-plan-card {
    position: relative;
    display: flex;
    flex-direction: column;
    text-align: left;
    background: var(--gce-surface);
    border: 1.5px solid var(--gce-border);
    border-radius: 14px;
    padding: 24px 20px 20px;
    cursor: pointer;
    font-family: inherit;
    color: inherit;
    transition: border-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.gce-plan-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(20, 33, 61, 0.1);
}

.gce-plan-card:focus-visible {
    outline: 2px solid var(--gce-primary);
    outline-offset: 2px;
}

.gce-plan-card.is-featured-popular {
    border-color: var(--gce-success);
    border-width: 2px;
    box-shadow: 0 6px 20px rgba(30, 132, 73, 0.12);
}

.gce-plan-ribbon {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gce-success);
    color: var(--gce-surface);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 5px 14px;
    border-radius: 999px;
    white-space: nowrap;
}

.gce-plan-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    font-size: 20px;
    border-radius: 50%;
    background: var(--gce-paper);
    margin-bottom: 12px;
}

.is-featured-popular .gce-plan-icon {
    background: var(--gce-success-soft);
}

.is-featured-value .gce-plan-icon {
    background: var(--gce-accent-soft);
}

.gce-plan-name {
    display: block;
    font-family: var(--gce-font-display);
    font-size: 19px;
    font-weight: 700;
    color: var(--gce-ink);
}

.gce-plan-cadence {
    display: block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--gce-ink-soft);
    margin-bottom: 14px;
}

.gce-plan-price {
    display: flex;
    align-items: baseline;
    gap: 6px;
    font-family: var(--gce-font-mono);
    font-size: 26px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--gce-ink);
}

.gce-plan-currency {
    font-size: 13px;
    font-weight: 500;
    color: var(--gce-ink-soft);
}

.gce-plan-per {
    display: block;
    font-size: 12px;
    color: var(--gce-ink-soft);
    margin-bottom: 10px;
}

.gce-plan-sub-badge {
    display: inline-block;
    align-self: flex-start;
    font-size: 12px;
    font-weight: 700;
    color: var(--gce-success-deep);
    background: var(--gce-success-soft);
    padding: 4px 10px;
    border-radius: 999px;
    margin-bottom: 14px;
}

.gce-plan-sub-badge.is-amber {
    color: #8A6512;
    background: var(--gce-accent-soft);
}

.gce-plan-headline {
    display: block;
    font-size: 14.5px;
    font-weight: 700;
    color: var(--gce-ink);
    margin-bottom: 4px;
    line-height: 1.3;
}

.gce-plan-sub {
    display: block;
    font-size: 13px;
    line-height: 1.5;
    color: var(--gce-ink-soft);
    margin-bottom: 16px;
}

.gce-plan-features {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
    flex-grow: 1;
}

.gce-plan-feature {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    color: var(--gce-ink);
    line-height: 1.4;
}

.gce-check {
    flex-shrink: 0;
    color: var(--gce-success);
    font-weight: 700;
    font-size: 12px;
    margin-top: 1px;
}

.gce-plan-cta {
    display: block;
    text-align: center;
    padding: 11px;
    font-size: 14px;
    font-weight: 700;
    color: var(--gce-primary);
    background: var(--gce-surface);
    border: 1.5px solid var(--gce-primary);
    border-radius: 999px;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.gce-plan-cta.is-filled {
    color: var(--gce-surface);
    background: var(--gce-success);
    border-color: var(--gce-success);
}

.gce-plan-card:hover .gce-plan-cta {
    background: var(--gce-primary);
    color: var(--gce-surface);
}

.gce-plan-card:hover .gce-plan-cta.is-filled {
    background: var(--gce-success-deep);
    border-color: var(--gce-success-deep);
}

/* ============================================================
   TRUST STRIP
   ============================================================ */
.gce-trust-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    background: var(--gce-paper);
    border-radius: 14px;
    padding: 20px;
}

.gce-trust-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 12.5px;
    color: var(--gce-ink-soft);
    line-height: 1.4;
}

.gce-trust-icon {
    font-size: 18px;
    flex-shrink: 0;
}

@media (max-width: 720px) {
    .gce-trust-strip {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================================
   CHECKOUT MODAL
   ============================================================ */
.gce-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(20, 33, 61, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 1000;
}

.gce-modal-overlay[hidden] {
    display: none;
}

.gce-modal {
    position: relative;
    width: 100%;
    max-width: 460px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    background: var(--gce-surface);
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 20px 60px rgba(20, 33, 61, 0.35);
    animation: gce-modal-in 0.2s ease;
}

@keyframes gce-modal-in {
    from { opacity: 0; transform: translateY(12px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
    .gce-modal { animation: none; }
    .gce-plan-card { transition: none; }
}

.gce-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 30px;
    height: 30px;
    border: none;
    background: var(--gce-paper);
    color: var(--gce-ink-soft);
    font-size: 18px;
    line-height: 1;
    border-radius: 50%;
    cursor: pointer;
}

.gce-modal-close:hover {
    background: var(--gce-border);
}

.gce-modal-close:focus-visible {
    outline: 2px solid var(--gce-primary);
    outline-offset: 2px;
}

.gce-modal-top {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding-right: 30px;
    margin-bottom: 22px;
}

.gce-modal-cart-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gce-success-soft);
    font-size: 18px;
    flex-shrink: 0;
}

.gce-modal-heading-block {
    flex-grow: 1;
}

.gce-modal-heading {
    font-family: var(--gce-font-display);
    font-size: 17px;
    font-weight: 700;
    color: var(--gce-success-deep);
    margin: 0 0 2px;
}

.gce-modal-sub {
    font-size: 12.5px;
    color: var(--gce-ink-soft);
    margin: 0;
    line-height: 1.4;
}

.gce-modal-price {
    font-family: var(--gce-font-mono);
    font-size: 20px;
    font-weight: 700;
    color: var(--gce-ink);
    white-space: nowrap;
    margin: 0;
}

.gce-field {
    display: block;
    margin-bottom: 14px;
}

.gce-field span {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--gce-ink-soft);
    margin-bottom: 6px;
}

.gce-field input {
    width: 100%;
    box-sizing: border-box;
    padding: 11px 14px;
    font-size: 15px;
    font-family: inherit;
    color: var(--gce-ink);
    background: var(--gce-surface);
    border: 1.5px solid var(--gce-border);
    border-radius: 8px;
    transition: border-color 0.15s ease;
}

.gce-field input:focus {
    outline: none;
    border-color: var(--gce-primary);
}

.gce-checkout-as {
    font-size: 14px;
    color: var(--gce-ink-soft);
    margin-bottom: 16px;
}

.gce-modal-security-note {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--gce-success-deep);
    background: var(--gce-success-soft);
    border-radius: 8px;
    padding: 10px 12px;
    margin: 4px 0 18px;
}

.gce-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-top: 16px;
    border-top: 1.5px solid var(--gce-border);
}

.gce-amount-block {
    font-size: 12px;
    color: var(--gce-ink-soft);
}

.gce-amount-block strong {
    display: block;
    font-family: var(--gce-font-mono);
    font-size: 18px;
    color: var(--gce-ink);
}

.gce-pay-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 22px;
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    color: var(--gce-surface);
    background: var(--gce-success);
    border: none;
    border-radius: 999px;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.15s ease;
}

.gce-pay-button:hover {
    background: var(--gce-success-deep);
}

.gce-pay-button:focus-visible {
    outline: 2px solid var(--gce-primary);
    outline-offset: 2px;
}

.gce-order-error {
    background: #FBEAE9;
    border: 1px solid var(--gce-error);
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 14px;
    margin: 0 0 16px;
}

/* ============================================================
   USERNAME PREVIEW - Clean Green Design
   ============================================================ */
.gce-username-preview {
    margin-top: 8px;
    padding: 10px 14px;
    background: var(--gce-success-soft);
    border-left: 4px solid var(--gce-success);
    border-radius: 4px;
}

.gce-username-preview .gce-username-label {
    color: var(--gce-success);
    font-size: 13px;
    line-height: 1.5;
    font-weight: 600;
}

.gce-username-preview .gce-username-example {
    color: var(--gce-success);
    font-size: 13px;
    line-height: 1.5;
    font-weight: 600;
}

.gce-username-preview .gce-username-result {
    margin-top: 2px;
}

.gce-username-preview .gce-username-result strong {
    color: var(--gce-success);
    font-weight: 700;
    font-size: 16px;
    letter-spacing: 0.3px;
}

/* ============================================================
   CONFIRMATION / MISC
   ============================================================ */
.gce-pricing-confirmation {
    text-align: center;
    padding: 48px 20px;
    font-family: var(--gce-font-display);
    font-size: 19px;
}

.gce-pricing-policy-link {
    text-align: center;
    margin-top: 28px;
    font-size: 13px;
}

.gce-pricing-policy-link a {
    color: var(--gce-ink-soft);
    text-decoration: underline;
}

@media (max-width: 480px) {
    .gce-pricing-header h1 { font-size: 24px; }
    .gce-plan-price { font-size: 22px; }
    .gce-modal { padding: 22px; }
    .gce-modal-footer { flex-direction: column; align-items: stretch; }
    .gce-pay-button { justify-content: center; }
}