/* spark-info modal styles — extracted from includes/spark-info-modal.php */
.spark-info-modal-content {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

/* Purchase success toast — dark glassmorphic with amber celebration accent */
.spark-purchase-toast {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(-24px);
    z-index: 100002;
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(20,20,30,0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(245, 158, 11, 0.35);
    border-radius: 16px;
    padding: 12px 16px 12px 12px;
    color: #fff;
    box-shadow:
        0 20px 50px rgba(0,0,0,0.55),
        0 0 30px rgba(245, 158, 11, 0.25),
        inset 0 1px 0 rgba(255,255,255,0.06);
    max-width: 420px;
    width: calc(100% - 32px);
    opacity: 0;
    pointer-events: none;
    overflow: hidden;
    transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
}
.spark-purchase-toast.is-visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: auto;
}
.spark-purchase-toast-glow {
    position: absolute;
    top: -40%;
    left: -10%;
    width: 50%;
    height: 180%;
    background: radial-gradient(ellipse at center, rgba(245,158,11,0.35) 0%, transparent 70%);
    filter: blur(20px);
    pointer-events: none;
    animation: sparkToastGlow 2.6s ease-in-out infinite;
}
@keyframes sparkToastGlow {
    0%, 100% { opacity: 0.6; transform: translateX(0); }
    50%      { opacity: 1;   transform: translateX(20%); }
}
.spark-purchase-toast-icon {
    position: relative;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: radial-gradient(circle at 30% 30%, #fff8c2 0%, #fde047 35%, #f59e0b 75%, #b45309 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow:
        inset 0 -3px 5px rgba(120,53,15,0.55),
        inset 0 1px 2px rgba(255,255,255,0.7),
        0 4px 12px rgba(245,158,11,0.45);
    animation: sparkToastIconPop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.spark-purchase-toast-bolt {
    font-size: 22px;
    line-height: 1;
    filter: drop-shadow(0 1px 1px rgba(120,53,15,0.5));
    animation: sparkToastBolt 1.4s ease-in-out infinite;
}
@keyframes sparkToastIconPop {
    0%   { transform: scale(0.4) rotate(-25deg); opacity: 0; }
    60%  { transform: scale(1.15) rotate(8deg);  opacity: 1; }
    100% { transform: scale(1)    rotate(0);     opacity: 1; }
}
@keyframes sparkToastBolt {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.12); }
}
.spark-purchase-toast-body {
    flex: 1;
    min-width: 0;
}
.spark-purchase-toast-title {
    font-size: 15px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.1px;
    line-height: 1.2;
}
.spark-purchase-toast-msg {
    font-size: 12.5px;
    color: rgba(255,255,255,0.6);
    line-height: 1.35;
    margin-top: 3px;
}
.spark-purchase-toast-close {
    background: rgba(255,255,255,0.06);
    border: none;
    color: rgba(255,255,255,0.55);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.15s, color 0.15s;
    padding: 0;
}
.spark-purchase-toast-close:hover {
    background: rgba(255,255,255,0.12);
    color: #fff;
}
@media (max-width: 480px) {
    .spark-purchase-toast {
        top: 12px;
        gap: 10px;
        padding: 10px 12px 10px 10px;
        border-radius: 14px;
    }
    .spark-purchase-toast-icon { width: 38px; height: 38px; border-radius: 10px; }
    .spark-purchase-toast-bolt { font-size: 19px; }
    .spark-purchase-toast-title { font-size: 14px; }
    .spark-purchase-toast-msg { font-size: 11.5px; }
}
@media (prefers-reduced-motion: reduce) {
    .spark-purchase-toast,
    .spark-purchase-toast-glow,
    .spark-purchase-toast-icon,
    .spark-purchase-toast-bolt {
        animation: none !important;
        transition: opacity 0.2s ease !important;
    }
}

/* Lemon Squeezy's injected overlay container sometimes stops short of the
   viewport bottom (its backdrop ends before the safe-area / fixed UI). Force
   it to cover the full viewport and sit above our top-level fixed elements
   (e.g. #bottomNavBar at z-index 9990) so the translucent backdrop dims
   everything beneath it consistently. Selectors are intentionally permissive
   to survive future LS.js renames. */
body > [id^="lemonsqueezy"],
body > [class^="lemonsqueezy"],
body > [class*="lemonsqueezy-modal"],
body > [class*="lemonsqueezy-overlay"],
body > [class*="ls-checkout-overlay"],
body > [class*="LemonSqueezyOverlay"] {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    /* dvh accounts for mobile dynamic viewport (URL bar shrinking) */
    height: 100dvh !important;
    z-index: 2147483647 !important;
}
.spark-info-modal-content::-webkit-scrollbar {
    display: none;
}

/* Unlock perks grid */
.spark-info-perks-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}
.spark-perk {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    padding: 10px 12px;
    transition: background 0.2s, border-color 0.2s;
}
.spark-perk:hover {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.1);
}
.spark-perk-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.spark-perk-body {
    min-width: 0;
    flex: 1;
}
.spark-perk-title {
    color: white;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.spark-perk-sub {
    color: rgba(255,255,255,0.4);
    font-size: 10px;
    line-height: 1.3;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Package cards */
.spark-info-package-item {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    padding: 16px 12px 14px;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s, border-color 0.2s, box-shadow 0.2s;
    position: relative;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.spark-info-package-item:hover {
    background: rgba(255,255,255,0.07);
    border-color: rgba(255,255,255,0.16);
    transform: translateY(-3px);
}
.spark-info-package-item:active {
    transform: translateY(0);
}
.spark-info-package-item.featured {
    background: linear-gradient(160deg, rgba(245,158,11,0.16) 0%, rgba(217,119,6,0.06) 100%);
    border-color: rgba(245,158,11,0.35);
    box-shadow: 0 0 24px rgba(245,158,11,0.18);
}
.spark-info-package-item.featured:hover {
    background: linear-gradient(160deg, rgba(245,158,11,0.22) 0%, rgba(217,119,6,0.1) 100%);
    border-color: rgba(245,158,11,0.5);
    box-shadow: 0 0 30px rgba(245,158,11,0.28);
}
.spark-pack-ribbon {
    position: absolute;
    top: -9px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(245,158,11,0.4);
}
.spark-pack-amount {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-top: 4px;
    margin-bottom: 4px;
}
.spark-pack-bolt {
    font-size: 22px;
    line-height: 1;
}
.spark-pack-count {
    color: white;
    font-weight: 800;
    font-size: 22px;
    line-height: 1;
    letter-spacing: -0.5px;
}
.spark-pack-name {
    color: rgba(255,255,255,0.5);
    font-size: 11px;
    margin-bottom: 8px;
}
.spark-pack-bonus {
    background: rgba(16,185,129,0.18);
    color: #10B981;
    padding: 3px 8px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.3px;
    display: inline-block;
    margin-bottom: 10px;
}
.spark-pack-bonus-spacer {
    height: 22px;
    margin-bottom: 10px;
}
.spark-pack-price {
    background: rgba(245,158,11,0.18);
    color: #F59E0B;
    padding: 9px 14px;
    border-radius: 10px;
    font-weight: 800;
    font-size: 14px;
    border: 1px solid rgba(245,158,11,0.3);
    width: 100%;
    transition: background 0.2s, border-color 0.2s;
}
.spark-info-package-item:hover .spark-pack-price {
    background: rgba(245,158,11,0.28);
    border-color: rgba(245,158,11,0.45);
}
.spark-info-package-item.featured .spark-pack-price {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(245,158,11,0.3);
}

@media (max-width: 900px) {
    #sparkInfoModal { padding: 0 !important; }
    #sparkInfoModal > .spark-info-modal-content {
        width: 100vw !important;
        max-width: 100vw !important;
        height: 100vh !important;
        height: 100svh !important;
        max-height: 100vh !important;
        max-height: 100svh !important;
        border-radius: 0 !important;
    }
    .spark-info-packages-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    .spark-info-perks-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
