/**
 * TackyLeague Anti-Ads Pro - Premium Gold & Blackish Design
 * Dark/Light Mode Compatible with Newsmatic Theme
 * NO EMOJIS - SVG Icons Only
 * Version: 2.0 - Professional Gold Edition
 */

/* ========================================
   CSS VARIABLES FOR DARK/LIGHT MODE
   ======================================== */

:root {
    /* Light mode colors */
    --tl-bg-primary: #ffffff;
    --tl-bg-secondary: #f8f9fa;
    --tl-bg-card: #ffffff;
    --tl-text-primary: #1a1a1a;
    --tl-text-secondary: #6b7280;
    --tl-border-color: #e5e7eb;
    --tl-shadow: rgba(0, 0, 0, 0.08);
    --tl-shadow-heavy: rgba(0, 0, 0, 0.15);

    /* Premium Gold & Blackish Brand Colors */
    --tl-gold: #FFD700;
    --tl-gold-dark: #DAA520;
    --tl-gold-light: #FFF4CC;
    --tl-black: #030f0f;
    --tl-black-light: #1a1a1a;
    --tl-black-medium: #2a2a2a;
    --tl-accent-gold: #FFA500;
    --tl-green: #00DF82;
    --tl-green-dark: #03624c;
}

/* Dark Mode - Newsmatic Theme & System Preference */
body.newsmatic_dark_mode,
.newsmatic_dark_mode,
body.dark-mode,
html[data-theme="dark"],
body.wp-dark-mode-active {
    --tl-bg-primary: #030f0f;
    --tl-bg-secondary: #0a0a0a;
    --tl-bg-card: #1a1a1a;
    --tl-text-primary: #ffffff;
    --tl-text-secondary: #b0b0b0;
    --tl-border-color: rgba(255, 215, 0, 0.15);
    --tl-shadow: rgba(255, 215, 0, 0.1);
    --tl-shadow-heavy: rgba(255, 215, 0, 0.2);
}

/* Dark Mode - System Preference */
@media (prefers-color-scheme: dark) {
    :root {
        --tl-bg-primary: #030f0f;
        --tl-bg-secondary: #0a0a0a;
        --tl-bg-card: #1a1a1a;
        --tl-text-primary: #ffffff;
        --tl-text-secondary: #b0b0b0;
        --tl-border-color: rgba(255, 215, 0, 0.15);
        --tl-shadow: rgba(255, 215, 0, 0.1);
        --tl-shadow-heavy: rgba(255, 215, 0, 0.2);
    }
}

/* ========================================
   ANTI-ADS PRO - PREMIUM PRICING SECTION
   ======================================== */

.tackyleague-adfree-wrapper {
    margin: 40px auto;
    max-width: 1100px;
    padding: 60px 40px;
    background: linear-gradient(135deg, var(--tl-bg-card) 0%, var(--tl-bg-secondary) 100%);
    border-radius: 28px;
    box-shadow: 0 30px 80px var(--tl-shadow-heavy),
                0 0 0 1px var(--tl-border-color);
    text-align: center;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    position: relative;
    color: var(--tl-text-primary);
}

/* Premium gold glow effect */
.tackyleague-adfree-wrapper::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: linear-gradient(
        45deg,
        var(--tl-gold),
        var(--tl-accent-gold),
        var(--tl-gold-dark),
        var(--tl-gold),
        var(--tl-accent-gold)
    );
    border-radius: 28px;
    z-index: -1;
    opacity: 0.3;
    filter: blur(25px);
    animation: goldPulse 4s ease-in-out infinite;
}

@keyframes goldPulse {
    0%, 100% { opacity: 0.2; filter: blur(25px); }
    50% { opacity: 0.4; filter: blur(30px); }
}

/* Premium Heading with Gold Gradient */
.adfree-heading {
    font-size: 42px;
    font-weight: 900;
    background: linear-gradient(
        135deg,
        var(--tl-gold) 0%,
        var(--tl-accent-gold) 50%,
        var(--tl-gold-dark) 100%
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 3px;
    text-shadow: 0 0 30px rgba(255, 215, 0, 0.3);
    position: relative;
}

/* Subtitle */
.tackyleague-adfree-wrapper::after {
    content: 'Experience TackyLeague Without Interruptions';
    display: block;
    font-size: 17px;
    color: var(--tl-gold);
    font-weight: 600;
    margin-top: -10px;
    margin-bottom: 60px;
    letter-spacing: 1px;
    opacity: 0.9;
}

/* Pricing Tiers Grid */
.adfree-pricing-tiers {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 35px;
    margin-bottom: 35px;
}

/* Individual Tier Card - FIXED OVERFLOW FOR BADGE */
.adfree-tier {
    background: linear-gradient(135deg, var(--tl-bg-card) 0%, var(--tl-bg-secondary) 50%, var(--tl-bg-card) 100%);
    border: 2px solid var(--tl-border-color);
    border-radius: 24px;
    padding: 40px 30px 35px 30px;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: 0 15px 50px var(--tl-shadow);
    overflow: visible; /* FIXED: Allow badge to overlap */
}

.adfree-tier::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--tl-gold), transparent);
    opacity: 0;
    transition: opacity 0.5s ease;
    border-radius: 24px 24px 0 0;
}

.adfree-tier:hover {
    transform: translateY(-10px) scale(1.03);
    box-shadow: 0 25px 70px var(--tl-shadow-heavy);
    border-color: var(--tl-gold);
}

.adfree-tier:hover::before {
    opacity: 1;
}

/* Recommended Tier (Tier 2) - Premium Treatment */
.adfree-tier.recommended {
    border-color: var(--tl-gold);
    border-width: 3px;
    background: linear-gradient(135deg, var(--tl-bg-card) 0%, rgba(255, 215, 0, 0.03) 50%, var(--tl-bg-card) 100%);
    box-shadow: 0 20px 60px rgba(255, 215, 0, 0.2),
                0 0 0 1px rgba(255, 215, 0, 0.1);
}

/* FIXED: "Best Value" Badge - No More Clipping! */
.recommended-badge {
    position: absolute;
    top: -16px; /* Moved slightly up for better visibility */
    right: 30px;
    background: linear-gradient(135deg, var(--tl-gold) 0%, var(--tl-accent-gold) 100%);
    color: var(--tl-black);
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 2px;
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.6),
                0 0 30px rgba(255, 215, 0, 0.3);
    text-transform: uppercase;
    border: 3px solid var(--tl-bg-card); /* Thicker border for contrast */
    display: inline-flex;
    align-items: center;
    gap: 6px;
    z-index: 10; /* Ensure it's always on top */
    animation: badgePulse 3s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 6px 20px rgba(255, 215, 0, 0.6), 0 0 30px rgba(255, 215, 0, 0.3);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 8px 25px rgba(255, 215, 0, 0.8), 0 0 40px rgba(255, 215, 0, 0.5);
    }
}

/* Premium crown/star icon for recommended badge */
.recommended-badge::before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 2l3 7 7-3-3 7 7 3-7 3 3 7-7-3-3 7-3-7-7 3 3-7-7-3 7-3-3-7 7 3 3-7z' fill='%23030f0f' stroke='%23030f0f' stroke-width='0.5'/%3E%3C/svg%3E");
    background-size: contain;
    filter: drop-shadow(0 0 2px rgba(255, 215, 0, 0.8));
}

/* Tier Header */
.tier-header {
    margin-bottom: 28px;
    padding-bottom: 22px;
    border-bottom: 2px solid var(--tl-border-color);
}

.tier-price {
    display: block;
    font-size: 60px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--tl-green) 0%, #00FFA3 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 10px;
    filter: drop-shadow(0 0 20px rgba(0, 223, 130, 0.3));
}

/* Tier 2 (Unlimited) - Premium Gold Price */
.tier-2 .tier-price {
    background: linear-gradient(135deg, var(--tl-gold) 0%, var(--tl-accent-gold) 50%, var(--tl-gold-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 25px rgba(255, 215, 0, 0.4));
}

.tier-duration {
    display: block;
    font-size: 16px;
    font-weight: 800;
    color: var(--tl-green);
    margin-top: 10px;
    letter-spacing: 2.5px;
    text-transform: uppercase;
}

.tier-2 .tier-duration {
    color: var(--tl-gold);
}

/* Tier Features */
.tier-features {
    margin-bottom: 30px;
    text-align: left;
    padding: 0 5px;
}

.tier-features p {
    margin: 14px 0;
    font-size: 15px;
    color: var(--tl-text-primary);
    opacity: 0.95;
    line-height: 1.8;
    position: relative;
    padding-left: 28px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Premium checkmark icon */
.tier-features p::before {
    content: '';
    position: absolute;
    left: 0;
    width: 18px;
    height: 18px;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='12' cy='12' r='10' fill='%2300DF82' opacity='0.2'/%3E%3Cpath d='M9 12l2 2 4-4' stroke='%2300DF82' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-size: contain;
}

.tier-2 .tier-features p::before {
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='12' cy='12' r='10' fill='%23FFD700' opacity='0.2'/%3E%3Cpath d='M9 12l2 2 4-4' stroke='%23FFD700' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.tier-features strong {
    color: var(--tl-gold);
    font-weight: 900;
    font-size: 16px;
}

/* Payment Buttons */
.adfree-payment-form {
    margin: 0;
}

.tackyleague-adfree-button {
    display: block;
    width: 100%;
    background: linear-gradient(135deg, var(--tl-green) 0%, var(--tl-green-dark) 100%);
    color: #ffffff;
    padding: 20px 40px;
    border: none;
    border-radius: 16px;
    font-size: 18px;
    font-weight: 900;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 25px rgba(0, 223, 130, 0.4),
                0 0 0 3px var(--tl-bg-card);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    overflow: hidden;
}

.tackyleague-adfree-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.6s ease;
}

.tackyleague-adfree-button:hover::before {
    left: 100%;
}

.tackyleague-adfree-button:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 40px rgba(0, 223, 130, 0.6),
                0 0 0 3px var(--tl-bg-card),
                0 0 30px rgba(0, 223, 130, 0.3);
    background: linear-gradient(135deg, #00FFA3 0%, var(--tl-green) 100%);
}

.tackyleague-adfree-button:active {
    transform: translateY(-1px);
}

/* Tier 2 Button (Unlimited) - Premium Gold */
.tier-2-button {
    background: linear-gradient(135deg, var(--tl-gold) 0%, var(--tl-accent-gold) 100%);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.5),
                0 0 0 3px var(--tl-bg-card);
    color: var(--tl-black);
}

.tier-2-button:hover {
    background: linear-gradient(135deg, var(--tl-accent-gold) 0%, var(--tl-gold-dark) 100%);
    box-shadow: 0 15px 40px rgba(255, 215, 0, 0.7),
                0 0 0 3px var(--tl-bg-card),
                0 0 35px rgba(255, 215, 0, 0.4);
    color: var(--tl-black);
}

/* Note Section with Icons */
.adfree-note {
    margin-top: 30px;
    font-size: 14px;
    color: var(--tl-text-secondary);
    line-height: 1.8;
    padding: 20px;
    background: var(--tl-bg-secondary);
    border-radius: 12px;
    border: 2px solid var(--tl-border-color);
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 25px;
}

.note-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: var(--tl-text-primary);
}

.note-icon {
    width: 18px;
    height: 18px;
    stroke: var(--tl-gold);
    filter: drop-shadow(0 0 3px rgba(255, 215, 0, 0.3));
}

/* SVG Icon Styles */
.badge-icon {
    width: 20px;
    height: 20px;
    stroke: currentColor;
}

/* ========================================
   ACTIVE AD-FREE STATUS CARD (PREMIUM GOLD)
   ======================================== */

.tackyleague-adfree-active-premium {
    max-width: 600px;
    margin: 30px auto;
    padding: 0;
}

.adfree-status-card {
    background: var(--tl-bg-card);
    border: 3px solid transparent;
    border-radius: 24px;
    padding: 40px;
    position: relative;
    overflow: hidden;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 215, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.adfree-status-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.adfree-status-card::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 50%, #FF8C00 100%);
    border-radius: 24px;
    z-index: -1;
    opacity: 0.6;
}

/* Header with checkmark icon */
.status-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 32px;
    position: relative;
    z-index: 1;
}

.status-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 8px 24px rgba(255, 215, 0, 0.4),
        inset 0 -2px 8px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
}

.status-icon svg {
    width: 28px;
    height: 28px;
    stroke: #000;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.status-title {
    font-size: 32px;
    font-weight: 800;
    margin: 0;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
    letter-spacing: -0.5px;
}

/* Days remaining counter */
.status-days {
    text-align: center;
    margin: 32px 0;
    padding: 32px;
    background: rgba(255, 215, 0, 0.05);
    border: 2px solid rgba(255, 215, 0, 0.2);
    border-radius: 16px;
    position: relative;
    z-index: 1;
}

.days-number {
    font-size: 72px;
    font-weight: 900;
    line-height: 1;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 50%, #FF8C00 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
    text-shadow: 0 8px 32px rgba(255, 215, 0, 0.5);
    letter-spacing: -2px;
}

.status-days.unlimited .days-number {
    display: flex;
    align-items: center;
    justify-content: center;
}

.infinity-icon {
    width: 80px;
    height: 80px;
    stroke: #FFD700;
    stroke-width: 2;
}

.days-label {
    font-size: 18px;
    font-weight: 700;
    color: var(--tl-accent-gold);
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Subscription details */
.status-details {
    margin: 32px 0;
    padding: 24px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    border: 1px solid rgba(255, 215, 0, 0.1);
    position: relative;
    z-index: 1;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 215, 0, 0.1);
}

.detail-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.detail-row:first-child {
    padding-top: 0;
}

.detail-label {
    font-size: 15px;
    color: var(--tl-text-secondary);
    font-weight: 600;
}

.detail-value {
    font-size: 16px;
    color: var(--tl-text-primary);
    font-weight: 700;
    text-align: right;
}

/* Restore link button */
.status-actions {
    margin-top: 32px;
    position: relative;
    z-index: 1;
}

.restore-link-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 16px 24px;
    background: rgba(255, 215, 0, 0.1);
    border: 2px solid var(--tl-accent-gold);
    border-radius: 12px;
    color: var(--tl-accent-gold);
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.restore-link-button:hover {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #000;
    border-color: transparent;
    box-shadow: 0 8px 24px rgba(255, 215, 0, 0.4);
    transform: translateY(-2px);
}

.restore-link-button .button-icon {
    width: 20px;
    height: 20px;
    stroke: currentColor;
}

/* Responsive design */
@media (max-width: 768px) {
    .adfree-status-card {
        padding: 32px 24px;
        border-radius: 20px;
    }

    .status-title {
        font-size: 26px;
    }

    .days-number {
        font-size: 56px;
    }

    .days-label {
        font-size: 16px;
    }

    .status-details {
        padding: 20px;
    }

    .detail-label,
    .detail-value {
        font-size: 14px;
    }

    .restore-link-button {
        padding: 14px 20px;
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .tackyleague-adfree-active-premium {
        margin: 20px auto;
    }

    .adfree-status-card {
        padding: 24px 20px;
        border-radius: 16px;
    }

    .status-header {
        gap: 12px;
        margin-bottom: 24px;
    }

    .status-icon {
        width: 40px;
        height: 40px;
    }

    .status-icon svg {
        width: 24px;
        height: 24px;
    }

    .status-title {
        font-size: 22px;
    }

    .status-days {
        padding: 24px 16px;
        margin: 24px 0;
    }

    .days-number {
        font-size: 48px;
    }

    .infinity-icon {
        width: 60px;
        height: 60px;
    }

    .days-label {
        font-size: 14px;
        letter-spacing: 1px;
    }

    .status-details {
        margin: 24px 0;
        padding: 16px;
    }

    .detail-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        padding: 10px 0;
    }

    .detail-value {
        text-align: left;
        font-size: 15px;
    }

    .status-actions {
        margin-top: 24px;
    }

    .restore-link-button {
        padding: 12px 16px;
        font-size: 14px;
        gap: 8px;
    }

    .restore-link-button .button-icon {
        width: 18px;
        height: 18px;
    }
}

/* OLD STYLES (DEPRECATED - kept for backward compatibility) */
.tackyleague-adfree-active {
    display: none; /* Hide old green badge */
}

.adfree-badge {
    display: none;
}

.adfree-expires {
    display: none;
}

/* ========================================
   LOADING STATE
   ======================================== */

.tackyleague-adfree-button.loading {
    opacity: 0.7;
    cursor: wait;
    pointer-events: none;
}

.tackyleague-adfree-button.loading::after {
    content: '';
    display: inline-block;
    width: 18px;
    height: 18px;
    margin-left: 12px;
    border: 3px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 768px) {
    .tackyleague-adfree-wrapper {
        padding: 50px 25px;
        margin: 30px 15px;
    }

    .adfree-heading {
        font-size: 32px;
        margin-bottom: 12px;
        letter-spacing: 2px;
    }

    .tackyleague-adfree-wrapper::after {
        font-size: 15px;
        margin-bottom: 50px;
    }

    .adfree-pricing-tiers {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .adfree-tier {
        padding: 35px 25px 30px 25px;
    }

    .tier-price {
        font-size: 52px;
    }

    .recommended-badge {
        top: -14px;
        right: 25px;
        font-size: 12px;
        padding: 7px 18px;
        letter-spacing: 1.5px;
    }

    .tier-features p {
        font-size: 14px;
    }

    .tackyleague-adfree-button {
        font-size: 17px;
        padding: 18px 35px;
    }

    .adfree-note {
        flex-direction: column;
        gap: 15px;
    }
}

@media (max-width: 640px) {
    .tackyleague-adfree-wrapper {
        margin: 20px 10px;
        padding: 40px 20px;
        border-radius: 24px;
    }

    .adfree-heading {
        font-size: 28px;
        letter-spacing: 1.5px;
    }

    .tackyleague-adfree-wrapper::after {
        font-size: 14px;
        margin-bottom: 45px;
    }

    .tier-price {
        font-size: 46px;
    }

    .tier-duration {
        font-size: 14px;
        letter-spacing: 2px;
    }

    .tier-features {
        padding: 0;
    }

    .tier-features p {
        font-size: 13px;
        padding-left: 25px;
    }

    .tackyleague-adfree-button {
        padding: 16px 30px;
        font-size: 16px;
        letter-spacing: 1.5px;
    }

    .adfree-note {
        font-size: 12px;
        padding: 15px;
    }

    .recommended-badge {
        top: -12px;
        right: 20px;
        font-size: 11px;
        padding: 6px 16px;
        letter-spacing: 1.2px;
    }

    .recommended-badge::before {
        width: 14px;
        height: 14px;
    }
}

/* ========================================
   DARK MODE SPECIFIC ENHANCEMENTS
   ======================================== */

/* Enhanced shadows and glows for dark mode */
body.newsmatic_dark_mode .tackyleague-adfree-wrapper,
.newsmatic_dark_mode .tackyleague-adfree-wrapper,
body.dark-mode .tackyleague-adfree-wrapper,
html[data-theme="dark"] .tackyleague-adfree-wrapper,
body.wp-dark-mode-active .tackyleague-adfree-wrapper {
    box-shadow: 0 30px 80px rgba(255, 215, 0, 0.15),
                0 0 0 1px rgba(255, 215, 0, 0.2);
}

body.newsmatic_dark_mode .adfree-tier,
.newsmatic_dark_mode .adfree-tier,
body.dark-mode .adfree-tier,
html[data-theme="dark"] .adfree-tier,
body.wp-dark-mode-active .adfree-tier {
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.8) 0%, rgba(10, 10, 10, 0.9) 50%, rgba(26, 26, 26, 0.8) 100%);
    box-shadow: 0 15px 50px rgba(255, 215, 0, 0.1);
}

body.newsmatic_dark_mode .adfree-tier.recommended,
.newsmatic_dark_mode .adfree-tier.recommended,
body.dark-mode .adfree-tier.recommended,
html[data-theme="dark"] .adfree-tier.recommended,
body.wp-dark-mode-active .adfree-tier.recommended {
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.9) 0%, rgba(255, 215, 0, 0.05) 50%, rgba(26, 26, 26, 0.9) 100%);
    box-shadow: 0 20px 60px rgba(255, 215, 0, 0.25),
                0 0 0 1px rgba(255, 215, 0, 0.15);
}

/* Dark mode system preference */
@media (prefers-color-scheme: dark) {
    .tackyleague-adfree-wrapper {
        box-shadow: 0 30px 80px rgba(255, 215, 0, 0.15),
                    0 0 0 1px rgba(255, 215, 0, 0.2);
    }

    .adfree-tier {
        background: linear-gradient(135deg, rgba(26, 26, 26, 0.8) 0%, rgba(10, 10, 10, 0.9) 50%, rgba(26, 26, 26, 0.8) 100%);
        box-shadow: 0 15px 50px rgba(255, 215, 0, 0.1);
    }

    .adfree-tier.recommended {
        background: linear-gradient(135deg, rgba(26, 26, 26, 0.9) 0%, rgba(255, 215, 0, 0.05) 50%, rgba(26, 26, 26, 0.9) 100%);
        box-shadow: 0 20px 60px rgba(255, 215, 0, 0.25),
                    0 0 0 1px rgba(255, 215, 0, 0.15);
    }
}

/* ========================================
   ToS AGREEMENT MODAL STYLES
   ======================================== */

/* Modal Overlay */
.tackyleague-modal-overlay {
    display: flex !important;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 10000000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Modal Container */
.tackyleague-modal-container {
    background: var(--tl-bg-card, #ffffff);
    border-radius: 20px;
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5),
                0 0 0 1px rgba(255, 215, 0, 0.3);
    animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Modal Header */
.tackyleague-modal-header {
    padding: 30px 30px 20px 30px;
    border-bottom: 2px solid var(--tl-border-color, rgba(0, 223, 130, 0.2));
    background: linear-gradient(135deg, rgba(0, 223, 130, 0.05) 0%, rgba(3, 98, 76, 0.05) 100%);
}

.tackyleague-modal-header h2 {
    margin: 0;
    color: var(--tl-gold, #FFD700);
    font-size: 24px;
    font-weight: 700;
}

/* Modal Body */
.tackyleague-modal-body {
    padding: 30px;
}

/* Purchase Summary */
.tackyleague-purchase-summary {
    padding: 20px;
    background: linear-gradient(135deg, rgba(0, 223, 130, 0.08) 0%, rgba(3, 98, 76, 0.08) 100%);
    border-radius: 12px;
    border: 2px solid var(--tl-border-color, rgba(0, 223, 130, 0.25));
    margin-bottom: 25px;
}

.tackyleague-purchase-summary h3 {
    color: var(--tl-green, #00DF82);
    margin: 0 0 15px 0;
    font-size: 18px;
    font-weight: 700;
}

.tackyleague-purchase-summary p {
    margin: 8px 0;
    font-size: 16px;
    color: var(--tl-text-primary, #333);
}

/* ToS Content */
.tackyleague-tos-content {
    margin: 25px 0;
    padding: 25px;
    background: var(--tl-bg-secondary, #f9f9f9);
    border-radius: 12px;
    border: 1px solid var(--tl-border-color, #e0e0e0);
    max-height: 350px;
    overflow-y: auto;
}

.tackyleague-tos-content h3 {
    color: var(--tl-text-primary, #333);
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: 700;
}

.tackyleague-tos-content ul {
    list-style-type: none;
    padding-left: 0;
    margin: 0;
}

.tackyleague-tos-content ul li {
    margin-bottom: 15px;
    padding-left: 30px;
    position: relative;
    line-height: 1.6;
    color: var(--tl-text-secondary, #555);
    font-size: 14px;
}

.tackyleague-tos-content ul li:last-child {
    margin-bottom: 0;
}

/* Custom scrollbar for ToS content */
.tackyleague-tos-content::-webkit-scrollbar {
    width: 8px;
}

.tackyleague-tos-content::-webkit-scrollbar-track {
    background: var(--tl-bg-primary, #f1f1f1);
    border-radius: 4px;
}

.tackyleague-tos-content::-webkit-scrollbar-thumb {
    background: var(--tl-green, #00DF82);
    border-radius: 4px;
}

.tackyleague-tos-content::-webkit-scrollbar-thumb:hover {
    background: var(--tl-green-dark, #03624c);
}

/* ToS Checkbox */
.tackyleague-tos-checkbox {
    margin-top: 25px;
}

.tackyleague-tos-checkbox label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    padding: 18px;
    background: var(--tl-bg-secondary, #f9f9f9);
    border-radius: 12px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.tackyleague-tos-checkbox label:hover {
    background: rgba(0, 223, 130, 0.05);
}

.tackyleague-tos-checkbox input[type="checkbox"] {
    width: 22px;
    height: 22px;
    cursor: pointer;
    margin-top: 2px;
    flex-shrink: 0;
    accent-color: var(--tl-green, #00DF82);
}

.tackyleague-tos-checkbox span {
    color: var(--tl-text-primary, #333);
    font-size: 15px;
    line-height: 1.6;
}

/* Modal Footer */
.tackyleague-modal-footer {
    padding: 20px 30px 30px 30px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

/* Modal Buttons */
.tackyleague-btn {
    flex: 1;
    min-width: 200px;
    padding: 16px 24px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.tackyleague-btn-primary {
    background: linear-gradient(135deg, var(--tl-green, #00DF82) 0%, var(--tl-green-dark, #03624c) 100%);
    color: white;
    box-shadow: 0 8px 25px rgba(0, 223, 130, 0.35);
}

.tackyleague-btn-primary:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(0, 223, 130, 0.45);
}

.tackyleague-btn-primary:not(:disabled):active {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(0, 223, 130, 0.25);
}

.tackyleague-btn-primary:disabled {
    cursor: not-allowed;
    opacity: 0.5;
    background: linear-gradient(135deg, #888 0%, #666 100%);
    box-shadow: none;
}

.tackyleague-btn-secondary {
    background: var(--tl-bg-secondary, #f1f1f1);
    color: var(--tl-text-primary, #333);
    border: 2px solid var(--tl-border-color, #ddd);
}

.tackyleague-btn-secondary:hover {
    background: var(--tl-bg-primary, #e8e8e8);
    border-color: var(--tl-green, #00DF82);
    color: var(--tl-green-dark, #03624c);
    transform: translateY(-2px);
}

.tackyleague-btn-secondary:active {
    transform: translateY(0);
}

/* ========================================
   DARK MODE - ToS MODAL
   ======================================== */

/* Newsmatic Theme Dark Mode */
body.newsmatic_dark_mode .tackyleague-modal-container,
.newsmatic_dark_mode .tackyleague-modal-container,
body.dark-mode .tackyleague-modal-container,
html[data-theme="dark"] .tackyleague-modal-container,
body.wp-dark-mode-active .tackyleague-modal-container {
    background: var(--tl-bg-card, #2a2a2a);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.8),
                0 0 0 1px rgba(255, 215, 0, 0.4);
}

body.newsmatic_dark_mode .tackyleague-modal-header,
.newsmatic_dark_mode .tackyleague-modal-header,
body.dark-mode .tackyleague-modal-header,
html[data-theme="dark"] .tackyleague-modal-header,
body.wp-dark-mode-active .tackyleague-modal-header {
    background: linear-gradient(135deg, rgba(0, 223, 130, 0.08) 0%, rgba(3, 98, 76, 0.08) 100%);
    border-bottom-color: rgba(0, 223, 130, 0.3);
}

body.newsmatic_dark_mode .tackyleague-purchase-summary,
.newsmatic_dark_mode .tackyleague-purchase-summary,
body.dark-mode .tackyleague-purchase-summary,
html[data-theme="dark"] .tackyleague-purchase-summary,
body.wp-dark-mode-active .tackyleague-purchase-summary {
    background: linear-gradient(135deg, rgba(0, 223, 130, 0.12) 0%, rgba(3, 98, 76, 0.12) 100%);
    border-color: rgba(0, 223, 130, 0.35);
}

body.newsmatic_dark_mode .tackyleague-purchase-summary p,
.newsmatic_dark_mode .tackyleague-purchase-summary p,
body.dark-mode .tackyleague-purchase-summary p,
html[data-theme="dark"] .tackyleague-purchase-summary p,
body.wp-dark-mode-active .tackyleague-purchase-summary p {
    color: #e0e0e0;
}

body.newsmatic_dark_mode .tackyleague-tos-content,
.newsmatic_dark_mode .tackyleague-tos-content,
body.dark-mode .tackyleague-tos-content,
html[data-theme="dark"] .tackyleague-tos-content,
body.wp-dark-mode-active .tackyleague-tos-content {
    background: rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 215, 0, 0.2);
}

body.newsmatic_dark_mode .tackyleague-tos-content h3,
.newsmatic_dark_mode .tackyleague-tos-content h3,
body.dark-mode .tackyleague-tos-content h3,
html[data-theme="dark"] .tackyleague-tos-content h3,
body.wp-dark-mode-active .tackyleague-tos-content h3 {
    color: #e0e0e0;
}

body.newsmatic_dark_mode .tackyleague-tos-content ul li,
.newsmatic_dark_mode .tackyleague-tos-content ul li,
body.dark-mode .tackyleague-tos-content ul li,
html[data-theme="dark"] .tackyleague-tos-content ul li,
body.wp-dark-mode-active .tackyleague-tos-content ul li {
    color: #b0b0b0;
}

body.newsmatic_dark_mode .tackyleague-tos-checkbox label,
.newsmatic_dark_mode .tackyleague-tos-checkbox label,
body.dark-mode .tackyleague-tos-checkbox label,
html[data-theme="dark"] .tackyleague-tos-checkbox label,
body.wp-dark-mode-active .tackyleague-tos-checkbox label {
    background: rgba(0, 0, 0, 0.3);
}

body.newsmatic_dark_mode .tackyleague-tos-checkbox label:hover,
.newsmatic_dark_mode .tackyleague-tos-checkbox label:hover,
body.dark-mode .tackyleague-tos-checkbox label:hover,
html[data-theme="dark"] .tackyleague-tos-checkbox label:hover,
body.wp-dark-mode-active .tackyleague-tos-checkbox label:hover {
    background: rgba(0, 223, 130, 0.1);
}

body.newsmatic_dark_mode .tackyleague-tos-checkbox span,
.newsmatic_dark_mode .tackyleague-tos-checkbox span,
body.dark-mode .tackyleague-tos-checkbox span,
html[data-theme="dark"] .tackyleague-tos-checkbox span,
body.wp-dark-mode-active .tackyleague-tos-checkbox span {
    color: #e0e0e0;
}

body.newsmatic_dark_mode .tackyleague-btn-secondary,
.newsmatic_dark_mode .tackyleague-btn-secondary,
body.dark-mode .tackyleague-btn-secondary,
html[data-theme="dark"] .tackyleague-btn-secondary,
body.wp-dark-mode-active .tackyleague-btn-secondary {
    background: rgba(0, 0, 0, 0.3);
    color: #e0e0e0;
    border-color: rgba(255, 215, 0, 0.3);
}

body.newsmatic_dark_mode .tackyleague-btn-secondary:hover,
.newsmatic_dark_mode .tackyleague-btn-secondary:hover,
body.dark-mode .tackyleague-btn-secondary:hover,
html[data-theme="dark"] .tackyleague-btn-secondary:hover,
body.wp-dark-mode-active .tackyleague-btn-secondary:hover {
    background: rgba(0, 0, 0, 0.5);
    border-color: var(--tl-green, #00DF82);
    color: var(--tl-green, #00DF82);
}

/* System Preference Dark Mode */
@media (prefers-color-scheme: dark) {
    .tackyleague-modal-container {
        background: #2a2a2a;
        box-shadow: 0 30px 80px rgba(0, 0, 0, 0.8),
                    0 0 0 1px rgba(255, 215, 0, 0.4);
    }

    .tackyleague-modal-header {
        background: linear-gradient(135deg, rgba(0, 223, 130, 0.08) 0%, rgba(3, 98, 76, 0.08) 100%);
        border-bottom-color: rgba(0, 223, 130, 0.3);
    }

    .tackyleague-purchase-summary {
        background: linear-gradient(135deg, rgba(0, 223, 130, 0.12) 0%, rgba(3, 98, 76, 0.12) 100%);
        border-color: rgba(0, 223, 130, 0.35);
    }

    .tackyleague-purchase-summary p {
        color: #e0e0e0;
    }

    .tackyleague-tos-content {
        background: rgba(0, 0, 0, 0.3);
        border-color: rgba(255, 215, 0, 0.2);
    }

    .tackyleague-tos-content h3 {
        color: #e0e0e0;
    }

    .tackyleague-tos-content ul li {
        color: #b0b0b0;
    }

    .tackyleague-tos-checkbox label {
        background: rgba(0, 0, 0, 0.3);
    }

    .tackyleague-tos-checkbox label:hover {
        background: rgba(0, 223, 130, 0.1);
    }

    .tackyleague-tos-checkbox span {
        color: #e0e0e0;
    }

    .tackyleague-btn-secondary {
        background: rgba(0, 0, 0, 0.3);
        color: #e0e0e0;
        border-color: rgba(255, 215, 0, 0.3);
    }

    .tackyleague-btn-secondary:hover {
        background: rgba(0, 0, 0, 0.5);
        border-color: #00DF82;
        color: #00DF82;
    }
}

/* ========================================
   MOBILE RESPONSIVE - ToS MODAL
   ======================================== */

@media (max-width: 768px) {
    .tackyleague-modal-container {
        max-height: 95vh;
        border-radius: 15px;
    }

    .tackyleague-modal-header {
        padding: 20px 20px 15px 20px;
    }

    .tackyleague-modal-header h2 {
        font-size: 20px;
    }

    .tackyleague-modal-body {
        padding: 20px;
    }

    .tackyleague-purchase-summary {
        padding: 15px;
    }

    .tackyleague-purchase-summary h3 {
        font-size: 16px;
    }

    .tackyleague-purchase-summary p {
        font-size: 14px;
    }

    .tackyleague-tos-content {
        padding: 18px;
        max-height: 250px;
    }

    .tackyleague-tos-content h3 {
        font-size: 14px;
    }

    .tackyleague-tos-content ul li {
        font-size: 13px;
        padding-left: 25px;
    }

    .tackyleague-tos-checkbox label {
        padding: 15px;
    }

    .tackyleague-tos-checkbox span {
        font-size: 13px;
    }

    .tackyleague-modal-footer {
        padding: 15px 20px 20px 20px;
        flex-direction: column;
    }

    .tackyleague-btn {
        min-width: 100%;
        font-size: 14px;
        padding: 14px 20px;
    }
}

@media (max-width: 480px) {
    .tackyleague-modal-overlay {
        padding: 10px;
    }

    .tackyleague-modal-container {
        border-radius: 12px;
    }

    .tackyleague-modal-header h2 {
        font-size: 18px;
    }

    .tackyleague-tos-content {
        max-height: 200px;
    }

    .tackyleague-tos-checkbox input[type="checkbox"] {
        width: 18px;
        height: 18px;
    }
}
