/* Theme-specific text colors for plans */
[data-theme="dark"] #plans-top .package-desc.free { color: #fff; }
[data-theme="light"] #plans-top .package-desc.pro { color: #000; }

/* Targeted text fixes for Free Plan in dark theme */
[data-theme="dark"] .subscription-card:not(.pro-card) {
    color: #ffffff !important;
}

[data-theme="dark"] .subscription-card:not(.pro-card) .feature-list .feature-item,
[data-theme="dark"] .subscription-card:not(.pro-card) .plan-title {
    color: #ffffff !important;
}

/* Diamond section theme colors */
[data-theme="light"] #diamond .package-desc { color: #000; }
[data-theme="light"] #diamond .promo .promo-help { color: #000; }
[data-theme="dark"] #diamond .package-desc { color: #fff; }

/* Feature items - specific colors based on section background */

/* Free Plan features (dark background in dark theme) */
[data-theme="light"] .package-desc.free .feature-list .feature-item {
    color: #000000 !important;
    -webkit-text-fill-color: #000000 !important;
}

[data-theme="dark"] .package-desc.free .feature-list .feature-item {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

/* PRO Plan features (light background in both themes) */
.package-desc.pro .feature-list .feature-item,
.pro-card .feature-list .feature-item {
    color: #000000 !important;
    -webkit-text-fill-color: #000000 !important;
}

/* High-specificity fixes for dark theme subscription cards */
html[data-theme="dark"] #plans-top .subscription-card:not(.pro-card),
html[data-theme="dark"] #plans-top .subscription-card:not(.pro-card) *,
html[data-theme="dark"] #plans-top .subscription-card:not(.pro-card) .feature-list .feature-item,
html[data-theme="dark"] #plans-top .subscription-card:not(.pro-card) .price,
html[data-theme="dark"] #plans-top .subscription-card:not(.pro-card) .period,
html[data-theme="dark"] .subscription-card:not(.pro-card) .feature-item,
html[data-theme="dark"] .subscription-card:not(.pro-card) .feature-list .feature-item {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

/* Make Pro Plan title blue like contact information in dark theme */
html[data-theme="dark"] #plans-top .subscription-card.pro-card h6,
html[data-theme="dark"] .subscription-card.pro-card h6,
html[data-theme="dark"] .pro-card h6 {
    color: #2481cc !important;
    -webkit-text-fill-color: #2481cc !important;
}

/* Price text - specific to card background contrast */
html[data-theme="dark"] .subscription-card:not(.pro-card) .price,
html[data-theme="dark"] .subscription-card:not(.pro-card) .period {
    color: #ffffff !important;
}

html[data-theme="dark"] .subscription-card.pro-card .price,
html[data-theme="dark"] .subscription-card.pro-card .period {
    color: #000000 !important;
}

/* Soften PRO card backgrounds for dark theme */
html[data-theme="dark"] .subscription-card.pro-card {
    background: linear-gradient(135deg, #3a3a2f, #4a4635) !important;
    border-color: #b8860b !important;
}

html[data-theme="dark"] .subscription-card.pro-card.active {
    background: linear-gradient(135deg, #4a4635, #5a5240) !important;
    border-color: #b8860b !important;
    box-shadow: 0 4px 12px rgba(184, 134, 11, 0.15) !important;
}

/* Adjust PRO card text colors for dark theme readability */
html[data-theme="dark"] .subscription-card.pro-card .feature-list .feature-item,
html[data-theme="dark"] .subscription-card.pro-card .price,
html[data-theme="dark"] .subscription-card.pro-card .period {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

/* Make subscription prices and payment buttons more prominent */

/* Enhanced price styling */
.price {
    font-size: 2.2rem !important;
    font-weight: 900 !important;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 4px;
}

.subscription-card .price {
    font-size: 2.5rem !important;
    font-weight: 900 !important;
    color: var(--color-interactive, #1D5A6C) !important;
    text-shadow: 0 2px 6px rgba(29,90,108,0.3);
}

.subscription-card.pro-card .price {
    font-size: 2.8rem !important;
    background: linear-gradient(135deg, #ffc107, #ff9800);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent !important;
    background-clip: text;
    text-shadow: 0 3px 8px rgba(255,193,7,0.4);
}

html[data-theme="dark"] .subscription-card.pro-card .price {
    background: linear-gradient(135deg, #ffeb3b, #ff9800) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    color: transparent !important;
    text-shadow: 0 3px 8px rgba(255,235,59,0.5) !important;
}

/* Enhanced payment button styling */
.btn[onclick*="startPayment"] {
    font-size: 1.1rem !important;
    padding: 1rem 1.5rem !important;
    font-weight: bold !important;
    text-transform: uppercase !important;
    letter-spacing: 0.8px !important;
    border-radius: 12px !important;
    transition: all 0.3s ease !important;
    position: relative !important;
    overflow: hidden !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2) !important;
}

.btn[onclick*="startPayment"]:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 8px 25px rgba(0,0,0,0.3) !important;
}

/* Primary payment button (yearly - recommended) */
.btn-primary[onclick*="startPayment"] {
    background: linear-gradient(135deg, #ffc107, #ff9800) !important;
    border: none !important;
    color: #000 !important;
    animation: pulse-yellow 2s infinite !important;
}

.btn-primary[onclick*="startPayment"]:hover {
    background: linear-gradient(135deg, #e0a800, #f57c00) !important;
    color: #000 !important;
}

/* Secondary payment button (monthly) */
.btn-outline-primary[onclick*="startPayment"] {
    background: transparent !important;
    border: 2px solid var(--color-interactive, #1D5A6C) !important;
    color: var(--color-interactive, #1D5A6C) !important;
}

.btn-outline-primary[onclick*="startPayment"]:hover {
    background: var(--color-interactive, #1D5A6C) !important;
    border-color: var(--color-interactive, #1D5A6C) !important;
    color: #fff !important;
}

/* Upgrade buttons */
.btn-upgrade,
.btn-warning[onclick*="showUpgradeModal"],
.btn[onclick*="scrollToPaymentButtons"] {
    background: linear-gradient(135deg, #ffc107, #ff9800) !important;
    border: none !important;
    color: #000 !important;
    font-weight: bold !important;
    font-size: 1.1rem !important;
    padding: 0.8rem 1.4rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.6px !important;
    border-radius: 10px !important;
    box-shadow: 0 4px 15px rgba(255,193,7,0.4) !important;
    transition: all 0.3s ease !important;
    animation: pulse-yellow 3s infinite !important;
}

.btn-upgrade:hover,
.btn-warning[onclick*="showUpgradeModal"]:hover,
.btn[onclick*="scrollToPaymentButtons"]:hover {
    background: linear-gradient(135deg, #e0a800, #f57c00) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(255,193,7,0.6) !important;
    color: #000 !important;
}

/* Pulsing animations for attention */
@keyframes pulse-glow {
    0% { box-shadow: 0 4px 15px rgba(255,193,7,0.4); }
    50% { box-shadow: 0 4px 25px rgba(255,193,7,0.7); }
    100% { box-shadow: 0 4px 15px rgba(255,193,7,0.4); }
}

@keyframes pulse-yellow {
    0% { box-shadow: 0 4px 15px rgba(255,193,7,0.4); }
    50% { box-shadow: 0 4px 25px rgba(255,193,7,0.7); }
    100% { box-shadow: 0 4px 15px rgba(255,193,7,0.4); }
}

/* Enhanced period text */
.period {
    font-size: 1rem !important;
    font-weight: 600 !important;
    opacity: 0.8;
}

/* Make price containers more prominent */
.price-tag {
    background: rgba(29,90,108,0.08) !important;
    padding: 1rem !important;
    border-radius: 12px !important;
    margin: 1rem 0 !important;
    border: 2px solid rgba(29,90,108,0.15) !important;
}

.subscription-card.pro-card .price-tag {
    background: rgba(255,193,7,0.1) !important;
    border-color: rgba(255,193,7,0.3) !important;
}

html[data-theme="dark"] .price-tag {
    background: rgba(29,90,108,0.2) !important;
    border-color: rgba(29,90,108,0.35) !important;
}

html[data-theme="dark"] .subscription-card.pro-card .price-tag {
    background: rgba(255,193,7,0.15) !important;
    border-color: rgba(255,193,7,0.4) !important;
}

/* Fix text visibility on payment buttons in dark theme */
html[data-theme="dark"] .btn[onclick*="startPayment"] {
    color: #ffffff !important;
}

html[data-theme="dark"] .btn[onclick*="startPayment"] small {
    color: #ffffff !important;
    opacity: 0.9 !important;
}

html[data-theme="dark"] .btn-primary[onclick*="startPayment"] {
    color: #000000 !important;
}

html[data-theme="dark"] .btn-primary[onclick*="startPayment"] small,
html[data-theme="dark"] .btn.btn-primary[onclick*="startPayment"] small,
html[data-theme="dark"] button.btn-primary[onclick*="startPayment"] small {
    color: #000000 !important;
    font-weight: bold !important;
    opacity: 1 !important;
    -webkit-text-fill-color: #000000 !important;
}

html[data-theme="dark"] .btn-outline-primary[onclick*="startPayment"] {
    border-color: var(--hhh-aqua, #2DD4BF) !important;
    color: var(--hhh-aqua, #2DD4BF) !important;
}

html[data-theme="dark"] .btn-outline-primary[onclick*="startPayment"]:hover {
    background: var(--hhh-aqua, #2DD4BF) !important;
    color: #000 !important;
}

html[data-theme="dark"] .btn-outline-primary[onclick*="startPayment"] small {
    color: inherit !important;
    opacity: 0.9 !important;
}

/* Make /year text match the exact same color as €39 price text */
html[data-theme="dark"] .price-option .period {
    color: inherit !important;
    opacity: 1 !important;
    font-weight: inherit !important;
    text-shadow: inherit !important;
    background: inherit !important;
    -webkit-background-clip: inherit !important;
    -webkit-text-fill-color: inherit !important;
}

/* Make /year text use the same gradient as €39 price text */
html[data-theme="dark"] .subscription-card.pro-card .price-option.recommended .period {
    background: linear-gradient(135deg, #ffeb3b, #ff9800) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    color: transparent !important;
    text-shadow: 0 3px 8px rgba(255,235,59,0.5) !important;
    opacity: 1 !important;
}

/* ========================================= */
/* CRITICAL FIX: FREE PLAN TEXT READABILITY IN DARK MODE */
/* Ensure ALL FREE plan elements are readable in dark theme */
/* ========================================= */

/* FREE Plan title (💝 Free Plan) - ensure h6 title is white in dark mode */
html[data-theme="dark"] #plans-top .subscription-card:not(.pro-card) h6,
html[data-theme="dark"] .subscription-card:not(.pro-card) h6,
html[data-theme="dark"] .subscription-card:not(.pro-card) h6.mb-0 {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    opacity: 1 !important;
}

/* FREE Plan description and feature items - ensure package-desc is white */
html[data-theme="dark"] #plans-top .subscription-card:not(.pro-card) .package-desc,
html[data-theme="dark"] .subscription-card:not(.pro-card) .package-desc,
html[data-theme="dark"] .subscription-card:not(.pro-card) .package-desc.free {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    opacity: 1 !important;
}

/* FREE Plan price elements - ensure $0 and /month are white */
html[data-theme="dark"] #plans-top .subscription-card:not(.pro-card) .price-tag .price,
html[data-theme="dark"] #plans-top .subscription-card:not(.pro-card) .price-tag .period,
html[data-theme="dark"] .subscription-card:not(.pro-card) .price-tag .price,
html[data-theme="dark"] .subscription-card:not(.pro-card) .price-tag .period {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    opacity: 1 !important;
}

/* Override any competing gradient/transparent styles for FREE plan price */
html[data-theme="dark"] .subscription-card:not(.pro-card) .price {
    background: none !important;
    -webkit-background-clip: initial !important;
    background-clip: initial !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

/* Ensure ALL text elements in FREE plan are readable with highest specificity */
html[data-theme="dark"] #plans-top .subscription-card:not(.pro-card) h6,
html[data-theme="dark"] #plans-top .subscription-card:not(.pro-card) p,
html[data-theme="dark"] #plans-top .subscription-card:not(.pro-card) span,
html[data-theme="dark"] #plans-top .subscription-card:not(.pro-card) div,
html[data-theme="dark"] #plans-top .subscription-card:not(.pro-card) .feature-item {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

/* ========================================= */
/* FREE PLAN "Current" CARD — DARK BACKGROUND FIX                       */
/* Root cause: .subscription-card.active sets background:#f0fff4          */
/* (near-white), while all text is forced white → contrast ratio ~1.03:1  */
/* Fix: override background to dark green for the active non-PRO card.    */
/* Does NOT affect: expired PRO (.pro-card.expired), active PRO, layout.  */
/* ========================================= */
html[data-theme="dark"] #plans-top .subscription-card.active:not(.pro-card),
html[data-theme="dark"] .subscription-card.active:not(.pro-card) {
    background: #122a1c !important;
    border-color: #28a745 !important;
    box-shadow: 0 4px 16px rgba(40, 167, 69, 0.45) !important;
}

/* $0 price — make it visually pop (bright green) against the dark card */
html[data-theme="dark"] #plans-top .subscription-card.active:not(.pro-card) .price-tag .price,
html[data-theme="dark"] .subscription-card.active:not(.pro-card) .price-tag .price {
    color: #4ade80 !important;
    -webkit-text-fill-color: #4ade80 !important;
}

/* /month period — slightly dimmer green so price stands out */
html[data-theme="dark"] #plans-top .subscription-card.active:not(.pro-card) .price-tag .period,
html[data-theme="dark"] .subscription-card.active:not(.pro-card) .price-tag .period {
    color: #86efac !important;
    -webkit-text-fill-color: #86efac !important;
}

/* Row separators inside the card — subtle white divider */
html[data-theme="dark"] .subscription-card.active:not(.pro-card) hr {
    border-color: rgba(255, 255, 255, 0.15) !important;
}