/*
 * ProPlayerFC Subscription — premium-locked feature UI
 * --------------------------------------------------------------
 * Provides three visual states for any feature element:
 *   .feature-lock--overlay → keeps content, dims it, stacks CTA
 *   .feature-lock--card    → replaces content with teaser card
 *   .feature-lock--badge   → keeps content, only adds Premium pill
 *
 * The accent color is per-feature, set via the inline custom prop
 * `--feature-lock-accent` so every locked surface uses a coherent
 * but distinct hue (e.g. tournament=green, page=violet, badges=red).
 */

:root {
    --ppfc-lock-bg: rgba(15, 18, 31, 0.72);
    --ppfc-lock-bg-soft: rgba(15, 18, 31, 0.42);
    --ppfc-lock-border: rgba(124, 92, 255, 0.28);
    --ppfc-lock-pill-bg: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    --ppfc-lock-pill-fg: #1f1300;
    --ppfc-lock-text: #f4f4f7;
    --ppfc-lock-muted: rgba(244, 244, 247, 0.7);
    --ppfc-lock-card-bg: linear-gradient(160deg, #181c2e 0%, #11132a 100%);
    --ppfc-lock-radius: 18px;
    --ppfc-lock-glow: 0 12px 36px -12px var(--feature-lock-accent, #7c5cff);
    --ppfc-lock-cta-bg: linear-gradient(135deg, #7c5cff 0%, #5b8def 100%);
    --feature-lock-accent: #7c5cff;
}

/* ---------- shared scaffolding ---------- */

.feature-lock {
    position: relative;
    isolation: isolate;
    border-radius: var(--ppfc-lock-radius);
}

.feature-lock--overlay,
.feature-lock--card {
    overflow: hidden;
}

.feature-lock--overlay > .feature-lock__content {
    filter: saturate(0.65) brightness(0.8) blur(0.4px);
    pointer-events: none;
    user-select: none;
    transition: filter 240ms ease;
}

.feature-lock__overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: linear-gradient(180deg,
        rgba(15, 18, 31, 0.45) 0%,
        rgba(15, 18, 31, 0.85) 100%);
    backdrop-filter: blur(2px);
    border-radius: inherit;
    color: var(--ppfc-lock-text);
    text-align: center;
    transition: background 240ms ease, backdrop-filter 240ms ease;
}

.feature-lock__overlay-inner {
    max-width: 380px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

/* ---------- icon + title + tagline ---------- */

.feature-lock__icon {
    font-size: 34px;
    line-height: 1;
    filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.35));
}

.feature-lock__icon--lg {
    font-size: 44px;
}

.feature-lock__title {
    margin: 4px 0 2px;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: #fff;
}

.feature-lock__tagline {
    margin: 0;
    font-size: 13.5px;
    color: var(--ppfc-lock-muted);
    line-height: 1.45;
}

/* ---------- plan chip ---------- */

.feature-lock__plan,
.feature-lock__plan-chip {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    padding: 6px 12px;
    margin-top: 6px;
    border-radius: 999px;
    font-size: 12.5px;
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.feature-lock__plan-prefix {
    color: var(--ppfc-lock-muted);
}

.feature-lock__plan-chip strong {
    color: #fff;
    font-weight: 700;
}

/* ---------- CTA button ---------- */

.feature-lock__cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    padding: 10px 18px;
    border: 0;
    border-radius: 999px;
    font: inherit;
    font-weight: 600;
    font-size: 13.5px;
    color: #fff;
    background: var(--ppfc-lock-cta-bg);
    box-shadow: var(--ppfc-lock-glow);
    cursor: pointer;
    transition: transform 160ms ease, box-shadow 200ms ease, filter 160ms ease;
    text-decoration: none;
}

.feature-lock__cta:hover,
.feature-lock__cta:focus-visible {
    transform: translateY(-1px);
    filter: brightness(1.06);
    box-shadow: 0 16px 42px -12px var(--feature-lock-accent, #7c5cff);
    outline: none;
}

.feature-lock__cta--primary {
    padding: 12px 22px;
    font-size: 14px;
}

/* ---------- card variant ---------- */

.feature-lock--card .feature-lock__card {
    position: relative;
    z-index: 1;
    padding: 24px 22px;
    border-radius: var(--ppfc-lock-radius);
    color: var(--ppfc-lock-text);
    background: var(--ppfc-lock-card-bg);
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.04) inset,
        var(--ppfc-lock-glow);
    overflow: hidden;
}

.feature-lock--card .feature-lock__card::before {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(
        135deg,
        var(--feature-lock-accent, #7c5cff) 0%,
        rgba(255, 255, 255, 0) 60%
    );
    -webkit-mask:
        linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    pointer-events: none;
    opacity: 0.55;
}

.feature-lock__card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.feature-lock__premium-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 999px;
    background: var(--ppfc-lock-pill-bg);
    color: var(--ppfc-lock-pill-fg);
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.feature-lock__pill-lock {
    width: 12px;
    height: 12px;
}

.feature-lock__benefits {
    margin: 14px 0 18px;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.feature-lock__benefits li {
    position: relative;
    padding-left: 26px;
    font-size: 13.5px;
    color: var(--ppfc-lock-muted);
    line-height: 1.45;
}

.feature-lock__benefits li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0;
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
    color: var(--feature-lock-accent, #7c5cff);
    background: rgba(124, 92, 255, 0.12);
}

.feature-lock__card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

/* ---------- badge variant ---------- */

.feature-lock--badge {
    overflow: visible;
}

.feature-lock__badge--corner {
    position: absolute;
    top: -6px;
    right: -6px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 999px;
    background: var(--ppfc-lock-pill-bg);
    color: var(--ppfc-lock-pill-fg);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    box-shadow: 0 6px 18px -8px rgba(0, 0, 0, 0.45);
    pointer-events: none;
}

.feature-lock__badge-icon {
    font-size: 11px;
    line-height: 1;
}

/* ---------- hover ---------- */

.feature-lock:hover,
.feature-lock:focus-within {
    cursor: pointer;
}

.feature-lock--overlay:hover .feature-lock__overlay,
.feature-lock--overlay:focus-within .feature-lock__overlay {
    background: linear-gradient(180deg,
        rgba(15, 18, 31, 0.55) 0%,
        rgba(15, 18, 31, 0.92) 100%);
}

.feature-lock--card:hover .feature-lock__card,
.feature-lock--card:focus-within .feature-lock__card {
    transform: translateY(-2px);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.05) inset,
        0 22px 48px -16px var(--feature-lock-accent, #7c5cff);
    transition: transform 220ms ease, box-shadow 240ms ease;
}

/* ---------- nav variant (links in side menus) ---------- */

.feature-locked--nav {
    position: relative;
}

.feature-locked--nav a,
a.feature-locked--nav {
    opacity: 0.78;
    transition: opacity 160ms ease, color 160ms ease;
}

.feature-locked--nav a::after,
a.feature-locked--nav::after {
    content: "Assinantes";
    margin-left: 8px;
    padding: 2px 7px;
    border-radius: 999px;
    background: var(--ppfc-lock-pill-bg);
    color: var(--ppfc-lock-pill-fg);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.02em;
    vertical-align: middle;
    white-space: nowrap;
}

.feature-locked--nav a:hover,
a.feature-locked--nav:hover {
    opacity: 1;
}

/*
 * Badge no cliente (feature-gate.js): sem nó DOM extra.
 * Pseudo ::after só para elementos .feature-locked--badge — evitar choque com
 * chevrons de layout (ex.: community-list move “›” para ::before).
 */
a.feature-locked.feature-locked--badge,
button.feature-locked.feature-locked--badge {
    position: relative;
    overflow: visible;
}

a.feature-locked.feature-locked--badge::after,
button.feature-locked.feature-locked--badge::after {
    content: "Assinantes";
    position: absolute;
    top: -7px;
    right: -4px;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 999px;
    background: var(--ppfc-lock-pill-bg);
    color: var(--ppfc-lock-pill-fg);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    box-shadow: 0 6px 18px -8px rgba(0, 0, 0, 0.45);
    pointer-events: none;
    white-space: nowrap;
    line-height: 1.2;
}

/* Upgrade modal styles live in upgrade_modal.phtml (scoped #proplayerfc-upgrade-modal). */

/* ---------- mobile ---------- */

@media (max-width: 640px) {
    .feature-lock--overlay {
        min-height: 200px;
    }

    .feature-lock__overlay-inner {
        gap: 8px;
    }

    .feature-lock__title {
        font-size: 16px;
    }

    .feature-lock__cta {
        width: 100%;
        justify-content: center;
        padding: 12px 18px;
    }

    .feature-lock__card-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .feature-lock__card-footer .feature-lock__cta {
        width: 100%;
    }
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
    .feature-lock__cta,
    .feature-lock--card .feature-lock__card {
        animation: none !important;
        transition: none !important;
    }
}
