/* ═══════════════════════════════════════════════════
   Checkout Page — Dark theme matching Pencil design
   Background: #020E0A  Card: #0A1F16  Border: rgba(0, 200, 112, 0.12)
   Primary: #00C870  Success: #22C55E  Text: #FFFFFF
   ═══════════════════════════════════════════════════ */

/* ── Page layout ── */
.co-page {
    padding: 32px 40px 64px;
    max-width: 1200px;
    margin: 0 auto;
}

.co-loading {
    display: flex;
    justify-content: center;
    padding: 64px 0;
}

.co-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 40px;
    align-items: start;
}

.co-main {
    min-width: 0;
}

/* ── Auth banner ── */
.co-auth-banner {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: rgba(34, 197, 94, 0.08);
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: 8px;
    font-size: 0.85rem;
    color: #94a3b8;
    margin-bottom: 16px;
}

/* ── Stepper ── */
.co-stepper {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 36px;
}

.co-step {
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

.co-step-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    background: transparent;
    border: 2px solid rgba(0, 200, 112, 0.12);
    color: #666;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.co-step.active .co-step-circle {
    background: #22C55E;
    border-color: #22C55E;
    color: #fff;
}

.co-step.completed .co-step-circle {
    background: #22C55E;
    border-color: #22C55E;
    color: #fff;
}

.co-step-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #666;
    transition: color 0.2s ease;
}

.co-step.active .co-step-label {
    color: #FFFFFF;
}

.co-step.completed .co-step-label {
    color: #22C55E;
}

.co-step-line {
    flex: 1;
    height: 2px;
    background: rgba(0, 200, 112, 0.12);
    margin: 0 16px;
    min-width: 32px;
    transition: background 0.2s ease;
}

.co-step-line.completed {
    background: #22C55E;
}

/* ── Common step content ── */
.co-step-content {
    animation: fadeIn 0.25s ease;
}

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

.co-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #FFFFFF;
    margin: 0 0 6px;
}

.co-subtitle {
    font-size: 0.9rem;
    color: #B8B9B6;
    margin: 0 0 28px;
}

/* ── Step 0: Account choice ── */
.co-account-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.co-account-card {
    background: #0A1F16;
    border: 1px solid rgba(0, 200, 112, 0.12);
    border-radius: 16px;
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
    position: relative;
}

.co-account-card-highlight {
    border-color: #B8860B;
    box-shadow: 0 0 0 1px #B8860B33;
}

.co-account-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #B8860B;
    color: #111;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.co-account-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(0, 200, 112, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
}

.co-account-icon-gold {
    background: #2E2A1A;
    border: 1px solid #B8860B44;
}

.co-account-card-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: #FFFFFF;
    margin: 0;
}

.co-account-card-desc {
    font-size: 0.82rem;
    color: #B8B9B6;
    line-height: 1.5;
    margin: 0;
    flex: 1;
}

/* ── Step 1: Payment / Contact ── */
.co-info-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #0A1F16;
    border: 1px solid rgba(0, 200, 112, 0.12);
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 28px;
    font-size: 0.82rem;
    color: #B8B9B6;
}

.co-section-heading {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: #FFFFFF;
    margin: 0 0 16px;
}

.co-section-heading-mt {
    margin-top: 28px;
}

.co-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.co-form-row-3 {
    grid-template-columns: 1fr 1fr 1fr;
}

.co-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

.co-form-row > .co-form-group {
    margin-bottom: 0;
}

.co-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #B8B9B6;
    letter-spacing: 0.01em;
}

.co-input {
    background: transparent;
    border: 1px solid rgba(0, 200, 112, 0.12);
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 0.9rem;
    color: #FFFFFF;
    font-family: 'Geist', 'Inter', sans-serif;
    outline: none;
    transition: border-color 0.15s ease;
    width: 100%;
}

.co-input::placeholder {
    color: #666;
}

.co-input:focus {
    border-color: #00C870;
}

.co-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-color: #1a1a2e;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2300C870' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
    cursor: pointer;
}

.co-select option {
    background-color: #1a1a2e;
    color: #FFFFFF;
}

.co-input-disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Payment method selector */
.co-payment-method {
    margin-bottom: 16px;
}

.co-payment-option {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #22C55E18;
    border: 1px solid #22C55E;
    border-radius: 10px;
    padding: 14px 16px;
    cursor: default;
}

.co-payment-radio-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid #22C55E;
    position: relative;
    flex-shrink: 0;
}

.co-payment-radio-dot::after {
    content: '';
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #22C55E;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.co-payment-label {
    font-weight: 600;
    color: #FFFFFF;
    font-size: 0.9rem;
}

.co-card-brands {
    display: flex;
    gap: 6px;
    margin-left: auto;
}

.co-card-brand {
    background: rgba(0, 200, 112, 0.12);
    color: #B8B9B6;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    letter-spacing: 0.03em;
}

/* Card placeholder fields */
.co-card-fields-placeholder {
    margin-top: 4px;
}

.co-card-note {
    font-size: 0.78rem;
    color: #666;
    margin: 4px 0 0;
    font-style: italic;
}

/* ── Step 2: Review ── */
.co-review-card {
    background: #0A1F16;
    border: 1px solid rgba(0, 200, 112, 0.12);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
}

.co-review-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.co-review-header h4 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    color: #FFFFFF;
    margin: 0;
}

.co-edit-btn {
    background: none;
    border: none;
    color: #00C870;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    transition: color 0.15s;
}

.co-edit-btn:hover {
    color: #00A85D;
    text-decoration: underline;
}

.co-review-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 0.85rem;
}

.co-review-label {
    color: #B8B9B6;
}

.co-review-value {
    color: #FFFFFF;
    font-weight: 500;
}

/* Stripe card element */
.co-stripe-element {
    border: 1px solid rgba(0, 200, 112, 0.12);
    border-radius: 8px;
    padding: 14px;
    background: #020E0A;
    min-height: 24px;
    transition: border-color 0.15s ease;
}

.co-stripe-element:focus-within {
    border-color: #00C870;
}

/* Terms checkbox */
.co-terms {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    margin: 20px 0 24px;
    font-size: 0.85rem;
    color: #B8B9B6;
}

.co-terms-checkbox {
    display: none;
}

.co-terms-box {
    width: 20px;
    height: 20px;
    min-width: 20px;
    border: 2px solid #00C870;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    margin-top: 1px;
}

.co-terms-checkbox:checked ~ .co-terms-box {
    background: #00C870;
}

.co-terms-checkbox:checked ~ .co-terms-box::after {
    content: '✓';
    color: #111;
    font-size: 13px;
    font-weight: 700;
}

.co-terms-text {
    line-height: 1.5;
}

.co-terms-link {
    color: #00C870;
    text-decoration: none;
    font-weight: 500;
}

.co-terms-link:hover {
    text-decoration: underline;
}

/* Platform terms (always shown) */
.co-platform-terms {
    color: #888888;
    font-size: 12px;
    line-height: 1.5;
    margin-top: 16px;
    margin-bottom: 4px;
}

/* Policy enforcement rows */
.co-policy-row {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: rgba(0, 200, 112, 0.04);
    border: 1px solid rgba(0, 200, 112, 0.12);
    border-radius: 8px;
}

.co-policy-row.co-policy-viewed {
    background: rgba(0, 200, 112, 0.08);
    border-color: #00C870;
}

.co-policy-read-btn {
    background: transparent;
    border: 1px solid #00C870;
    color: #00C870;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
}

.co-policy-read-btn:hover {
    background: rgba(0, 200, 112, 0.1);
}

/* Error alert */
.co-error {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #24100B;
    border: 1px solid #FF5C33;
    border-radius: 8px;
    padding: 12px 16px;
    color: #FF5C33;
    font-size: 0.85rem;
    margin: 16px 0;
}

/* ── Buttons ── */
.co-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: 'Geist', 'Inter', sans-serif;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.co-btn-primary {
    background: #00C870;
    border: 2px solid #00C870;
    color: #020E0A;
}

.co-btn-primary:hover:not(:disabled) {
    background: #00A85D;
    border-color: #00A85D;
}

.co-btn-primary:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.co-btn-outline {
    background: transparent;
    border: 2px solid #00C870;
    color: #00C870;
}

.co-btn-outline:hover {
    background: #00C870;
    color: #111;
}

.co-btn-secondary {
    background: #020E0A;
    border: 2px solid rgba(0, 200, 112, 0.12);
    color: #FFFFFF;
}

.co-btn-secondary:hover {
    background: #0A1F16;
    border-color: #3a3a3a;
}

.co-btn-place-order {
    padding: 14px 32px;
    border: 2px solid #00C870;
    background: transparent;
    color: #00C870;
}

.co-btn-place-order:hover:not(:disabled) {
    background: #00C870;
    color: #111;
}

.co-link-btn {
    background: none;
    border: none;
    color: #B8B9B6;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    padding: 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: color 0.15s;
    font-family: 'Geist', 'Inter', sans-serif;
}

.co-link-btn:hover {
    color: #FFFFFF;
}

/* Action rows */
.co-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 24px;
}

.co-actions-between {
    justify-content: space-between;
}

.co-actions-end {
    justify-content: flex-end;
}

/* ── Order Summary Sidebar ── */
.co-sidebar {
    position: sticky;
    top: 80px;
}

.co-summary {
    background: #0A1F16;
    border: 1px solid rgba(0, 200, 112, 0.12);
    border-radius: 16px;
    padding: 24px;
}

.co-summary-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: #FFFFFF;
    margin: 0 0 16px;
}

.co-summary-event {
    font-size: 0.95rem;
    font-weight: 600;
    color: #FFFFFF;
    margin-bottom: 12px;
}

.co-summary-detail {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    color: #B8B9B6;
    margin-bottom: 6px;
}

.co-summary-reserved {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    color: #B8B9B6;
    margin-top: 16px;
    padding: 10px 12px;
    background: #111;
    border: 1px solid rgba(0, 200, 112, 0.12);
    border-radius: 8px;
}

.co-summary-divider {
    height: 1px;
    background: rgba(0, 200, 112, 0.12);
    margin: 16px 0;
}

.co-summary-line {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: #B8B9B6;
    margin-bottom: 8px;
}

.co-summary-total {
    font-size: 1rem;
    font-weight: 700;
    color: #FFFFFF;
    margin-bottom: 0;
}

.co-summary-items {
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-height: 240px;
    overflow-y: auto;
}

.co-summary-item {
    color: #E8E9E6;
    margin-bottom: 4px;
}

.co-summary-item > span:first-child {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-right: 12px;
}

.co-summary-item > span:last-child {
    flex-shrink: 0;
    color: #FFFFFF;
}

/* ── Hold Timer ── */
.co-timer {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 10px 12px;
    background: #111;
    border: 1px solid rgba(0, 200, 112, 0.12);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.co-timer-label {
    font-size: 0.75rem;
    color: #B8B9B6;
}

.co-timer-digits {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    color: #00C870;
    margin-left: auto;
}

.co-timer-warning {
    border-color: #FF5C33;
    background: #24100B;
}

.co-timer-warning .co-timer-digits {
    color: #FF5C33;
}

.co-timer-alert {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding: 10px 12px;
    background: #24100B;
    border: 1px solid #FF5C33;
    border-radius: 8px;
    color: #FF5C33;
    font-size: 0.75rem;
    font-weight: 600;
    animation: timerPulse 1.5s ease-in-out infinite;
}

.co-timer-expired {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding: 10px 12px;
    background: #24100B;
    border: 1px solid #FF5C33;
    border-radius: 8px;
    color: #FF5C33;
    font-size: 0.75rem;
    font-weight: 600;
}

@keyframes timerPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* ── Step 3: Confirmation ── */
.co-confirmation {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 48px 24px;
    max-width: 560px;
    margin: 0 auto;
}

.co-confirm-icon {
    margin-bottom: 16px;
}

.co-confirm-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    color: #FFFFFF;
    margin: 0 0 12px;
}

.co-confirm-subtitle {
    font-size: 0.9rem;
    color: #B8B9B6;
    line-height: 1.6;
    margin: 0 0 24px;
}

.co-confirm-email {
    color: #FFFFFF;
    font-weight: 500;
}

.co-confirm-order-id {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #0A1F16;
    border: 1px solid rgba(0, 200, 112, 0.12);
    border-radius: 999px;
    padding: 8px 20px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #B8B9B6;
    margin-bottom: 32px;
    font-family: 'Space Grotesk', sans-serif;
}

.co-confirm-details {
    width: 100%;
    background: #0A1F16;
    border: 1px solid rgba(0, 200, 112, 0.12);
    border-radius: 16px;
    padding: 24px;
    text-align: left;
    margin-bottom: 32px;
}

.co-confirm-details-heading {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: #FFFFFF;
    margin: 0 0 16px;
}

.co-confirm-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(0, 200, 112, 0.12);
    font-size: 0.85rem;
}

.co-confirm-row:last-child {
    border-bottom: none;
}

.co-confirm-total-row {
    padding-top: 14px;
    margin-top: 6px;
    border-top: 1px solid rgba(0, 200, 112, 0.12);
    border-bottom: none;
}

.co-confirm-label {
    color: #B8B9B6;
}

.co-confirm-value {
    color: #FFFFFF;
    font-weight: 500;
}

.co-confirm-total-row .co-confirm-label,
.co-confirm-total-row .co-confirm-value {
    font-weight: 700;
    font-size: 0.95rem;
}

.co-confirm-actions {
    display: flex;
    gap: 16px;
    align-items: center;
}

.co-btn-ghost {
    background: transparent;
    border: 2px solid rgba(0, 200, 112, 0.12);
    color: #FFFFFF;
}

.co-btn-ghost:hover {
    background: rgba(0, 200, 112, 0.12);
}

/* ── Responsive ── */
@media (max-width: 960px) {
    .co-layout {
        grid-template-columns: 1fr;
    }

    .co-sidebar {
        position: static;
        order: -1;
    }

    .co-page {
        padding: 24px 16px 48px;
    }

    .co-account-options {
        grid-template-columns: 1fr;
    }

    .co-form-row-3 {
        grid-template-columns: 1fr 1fr;
    }

    .co-stepper {
        gap: 0;
    }

    .co-step-line {
        min-width: 16px;
        margin: 0 8px;
    }

    .co-step-label {
        font-size: 0.78rem;
    }
}

@media (max-width: 600px) {
    .co-form-row {
        grid-template-columns: 1fr;
    }

    .co-form-row-3 {
        grid-template-columns: 1fr;
    }

    .co-actions-between {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .co-actions-between .co-link-btn {
        text-align: center;
        justify-content: center;
    }

    .co-btn-place-order {
        width: 100%;
    }
}

/* ── Compact payment-step layout (embed only) ─────────────────────────── */
.co-step-content--compact {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.co-mini-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: #5A9A7A;
    text-transform: none;
    letter-spacing: 0.02em;
    margin-bottom: 4px;
}

.co-apply-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.co-apply-col {
    min-width: 0;
}

.co-apply-pair {
    display: flex;
    gap: 6px;
    align-items: stretch;
}

.co-input-compact {
    flex: 1;
    min-width: 0;
    height: 34px;
    padding: 8px 10px;
    border-radius: 8px;
    background: #071912;
    border: 1px solid #1A3D2E;
    color: #E8E0C8;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
}

.co-input-compact::placeholder {
    color: #5A9A7A;
}

.co-input-compact:focus {
    outline: none;
    border-color: #00C870;
}

.co-apply-btn {
    height: 34px;
    padding: 0 14px;
    border-radius: 8px;
    background: transparent;
    border: 1px solid #00C870;
    color: #00C870;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

.co-apply-btn:hover:not(:disabled) {
    background: rgba(0, 200, 112, 0.10);
}

.co-apply-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.co-apply-applied {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    border-radius: 8px;
    background: rgba(0, 200, 112, 0.08);
    border: 1px solid rgba(0, 200, 112, 0.25);
    font-size: 12px;
    color: #E8E0C8;
    line-height: 1.2;
}

.co-apply-applied > span {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.co-apply-applied .co-link-btn {
    color: #5A9A7A !important;
    font-size: 11px !important;
    flex-shrink: 0;
}

.co-apply-error {
    color: #f87171;
    font-size: 11px;
    margin-top: 4px;
}

.co-card-sec {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.co-stripe-element-compact {
    min-height: 38px;
    padding: 10px 12px;
    background: #071912;
    border: 1px solid #1A3D2E;
    border-radius: 8px;
}

.co-stripe-element-compact:focus-within {
    border-color: #00C870;
}

.co-secure-note {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 8px;
    background: #0D2A1F;
    color: #5A9A7A;
    font-size: 11px;
}

.co-info-banner-compact {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 8px;
    background: rgba(0, 200, 112, 0.08);
    border: 1px solid rgba(0, 200, 112, 0.25);
    color: #E8E0C8;
    font-size: 13px;
}

