/**
 * Pricing Components - Liquid Glass Design
 * =========================================
 *
 * Shared CSS for pricing cards and service costs tables.
 * Uses glass card design patterns from dark-theme.css.
 *
 * Components:
 * - .pricing-card: Main pricing card (coins or subscription)
 * - .service-costs-table: Service costs reference
 */

/* ========================================
   PRICING CARD - GLASS EFFECT
   Inherits from .card-glass in dark-theme.css
   ======================================== */

.pricing-card {
    position: relative;
    padding: 2rem;
    text-align: center;
    margin-bottom: 1rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    overflow: visible;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Featured card - subtle accent */
.pricing-card-featured {
    border: 2px solid var(--accent-primary, #FF8A4C) !important;
    transform: scale(1.02);
}

.pricing-card-featured::before {
    background: linear-gradient(
        160deg,
        rgba(255, 138, 76, 0.3) 0%,
        rgba(255, 138, 76, 0.1) 30%,
        transparent 50%,
        transparent 100%
    ) !important;
}

/* Current plan indicator */
.pricing-card-current {
    opacity: 0.85;
}

/* Badge styling */
.pricing-badge {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent-primary, #FF8A4C);
    border: none;
    color: var(--text-on-accent, #fff);
    padding: 6px 18px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 20px;
    white-space: nowrap;
    z-index: 10;
}

.pricing-badge-current {
    background: var(--accent-primary, #FF8A4C);
    border-color: var(--accent-primary, #FF8A4C);
    color: var(--text-on-accent, #fff);
}

/* Label (package/plan name) */
.pricing-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--content-tertiary, rgba(255, 255, 255, 0.6));
    margin-bottom: 0.5rem;
}

/* Coins display */
.pricing-coins {
    font-size: 3rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--content-primary, #fff);
    line-height: 1.1;
}

.pricing-coins-label {
    font-size: 14px;
    color: var(--content-secondary, rgba(255, 255, 255, 0.8));
    margin-bottom: 0.75rem;
}

/* Price display */
.pricing-price {
    margin: 0.75rem 0 0.5rem;
}

.pricing-amount {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--content-primary, #fff);
}

.pricing-period {
    font-size: 1rem;
    font-weight: 400;
    color: var(--content-tertiary, rgba(255, 255, 255, 0.6));
}

/* Per-coin rate */
.pricing-rate {
    font-size: 0.875rem;
    color: var(--content-tertiary, rgba(255, 255, 255, 0.6));
    margin-bottom: 1rem;
}

/* Description */
.pricing-description {
    font-size: 0.9rem;
    color: var(--content-secondary, rgba(255, 255, 255, 0.8));
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

/* Features list (subscriptions) */
.pricing-features {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
    text-align: left;
}

.pricing-features li {
    padding: 0.5rem 0;
    color: var(--content-primary, #fff);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.95rem;
}

.pricing-features li i {
    color: var(--accent-primary, #FF8A4C);
    font-size: 1rem;
    flex-shrink: 0;
}

/* CTA Button */
.pricing-cta {
    width: 100%;
    padding: 0.875rem 1.5rem;
    font-weight: 600;
    font-size: 1rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.pricing-cta:not(:disabled):hover {
    transform: translateY(-2px);
}

.pricing-cta-current {
    background: var(--bg-surface, rgba(255, 255, 255, 0.1));
    border-color: var(--glass-border, rgba(255, 255, 255, 0.1));
    color: var(--content-tertiary, rgba(255, 255, 255, 0.6));
    cursor: default;
}

/* Outline button for non-featured cards */
.pricing-card:not(.pricing-card-featured) .btn-outline-light {
    border-color: var(--glass-border, rgba(255, 255, 255, 0.2));
    color: var(--content-primary, #fff);
}

.pricing-card:not(.pricing-card-featured) .btn-outline-light:hover {
    background: var(--accent-primary, #FF8A4C);
    border-color: var(--accent-primary, #FF8A4C);
    color: var(--text-on-accent, #fff);
}

/* ========================================
   SERVICE COSTS TABLE
   ======================================== */

.service-costs-table {
    padding: 1.5rem;
    margin-top: 2rem;
    border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.1));
    border-radius: 16px;
    background: var(--bg-surface, rgba(255, 255, 255, 0.03));
}

.service-costs-header {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--content-tertiary, rgba(255, 255, 255, 0.6));
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--glass-border, rgba(255, 255, 255, 0.1));
}

.service-costs-table .table {
    color: var(--content-primary, #fff);
}

.service-costs-table .table td {
    padding: 0.625rem 0;
    vertical-align: middle;
    border: none;
}

.service-name {
    color: var(--content-primary, #fff);
    font-size: 0.95rem;
}

.service-name small {
    font-size: 0.8rem;
    margin-top: 2px;
}

.service-cost {
    white-space: nowrap;
}

.coin-amount {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    color: var(--color-warning-solid, #FFD700);
    font-weight: 600;
}

.coin-amount i {
    font-size: 0.9rem;
}

/* Compact variant */
.service-costs-compact {
    padding: 1rem;
}

.service-costs-compact .service-costs-header {
    font-size: 12px;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
}

.service-costs-compact .table td {
    padding: 0.375rem 0;
    font-size: 0.875rem;
}

/* ========================================
   RESPONSIVE ADJUSTMENTS
   ======================================== */

@media (max-width: 768px) {
    .pricing-card {
        padding: 1.5rem;
    }

    .pricing-coins {
        font-size: 2.5rem;
    }

    .pricing-amount {
        font-size: 1.5rem;
    }

    .pricing-badge {
        font-size: 10px;
        padding: 3px 12px;
    }

    .pricing-card-featured {
        transform: none;
    }
}

/* ========================================
   LIGHT MODE OVERRIDES
   ======================================== */

[data-theme="light"] .pricing-card {
    background: var(--bg-base, #ffffff) !important;
    border: 1px solid var(--border-color, rgba(0, 0, 0, 0.1));
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .pricing-card-featured {
    border: 2px solid var(--accent-primary, #FF8A4C) !important;
}

[data-theme="light"] .pricing-badge {
    background: var(--accent-primary, #FF8A4C);
    color: var(--text-on-accent, #fff);
}

[data-theme="light"] .pricing-label {
    color: var(--text-muted, #666);
}

[data-theme="light"] .pricing-coins,
[data-theme="light"] .pricing-amount {
    color: var(--text-primary, #1a1a1a);
}

[data-theme="light"] .pricing-coins-label,
[data-theme="light"] .pricing-period,
[data-theme="light"] .pricing-rate {
    color: var(--text-muted, #666);
}

[data-theme="light"] .pricing-description {
    color: var(--text-secondary, #444);
}

[data-theme="light"] .pricing-features li {
    color: var(--text-primary, #1a1a1a);
}

[data-theme="light"] .service-costs-table {
    background: var(--bg-surface, #f8f9fa);
    border-color: var(--border-color, rgba(0, 0, 0, 0.1));
}

[data-theme="light"] .service-costs-header {
    color: var(--text-muted, #666);
    border-bottom-color: var(--border-color, rgba(0, 0, 0, 0.1));
}

[data-theme="light"] .service-costs-table .table,
[data-theme="light"] .service-name {
    color: var(--text-primary, #1a1a1a);
}

[data-theme="light"] .coin-amount {
    color: var(--color-warning-dark, #b8860b);
}

/* ========================================
   ACCESSIBILITY
   ======================================== */

/* Focus indicators */
.pricing-cta:focus-visible {
    outline: 2px solid var(--accent-primary, #FF8A4C);
    outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .pricing-card,
    .pricing-cta {
        transition: none;
    }

    .pricing-card-featured {
        transform: none;
    }

    .pricing-cta:not(:disabled):hover {
        transform: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .pricing-card {
        border: 2px solid currentColor;
    }

    .pricing-features li i {
        color: inherit;
    }
}
