/* Public group surfaces migrated from CSS isolation. */

.pg-hero {
    --hero-primary: var(--pg-primary, var(--brand-primary));
    --hero-secondary: var(--pg-secondary, var(--brand-secondary));
    --hero-accent: var(--pg-accent, var(--brand-accent));
    --hero-gold: #f8d47a;
    --hero-warm: #fff8e7;
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, .95fr);
    align-items: center;
    gap: clamp(16px, 3vw, 38px);
    min-height: clamp(320px, 28vw, 410px);
    padding: clamp(22px, 3.5vw, 46px);
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: var(--radius-xl, 32px);
    color: #fff;
    background:
        radial-gradient(circle at 16% 10%, color-mix(in srgb, var(--hero-primary) 42%, transparent), transparent 31%),
        radial-gradient(circle at 82% 22%, rgba(248, 212, 122, .18), transparent 26%),
        radial-gradient(circle at 100% 100%, color-mix(in srgb, var(--hero-accent) 26%, transparent), transparent 30%),
        var(--pg-hero-image, url('/images/groups/christmas-hero.jpg')),
        linear-gradient(135deg, #08121b 0%, color-mix(in srgb, var(--hero-secondary) 72%, #071019) 46%, #120b14 100%);
    background-position: center right;
    background-size: cover;
    background-repeat: no-repeat;
    box-shadow: var(--shadow-lg, 0 24px 60px rgba(15, 23, 42, .12));
}

.pg-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    background:
        linear-gradient(115deg, rgba(255, 255, 255, .11), transparent 28%, rgba(255, 255, 255, .07) 65%, transparent),
        repeating-linear-gradient(98deg, rgba(255, 255, 255, .045) 0 1px, transparent 1px 58px);
    opacity: .9;
}

.pg-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(90deg, rgba(4, 10, 18, .82) 0%, rgba(4, 10, 18, .5) 46%, rgba(4, 10, 18, .16) 100%);
}

.pg-hero-content {
    position: relative;
    z-index: 2;
    display: grid;
    gap: clamp(8px, 1.1vw, 13px);
    max-width: 720px;
    padding-left: 32px;
}

.pg-hero-kicker {
    width: fit-content;
    padding: 8px 14px;
    border: 1px solid rgba(248, 212, 122, .38);
    border-radius: 8px;
    color: var(--hero-gold);
    background: rgba(255, 255, 255, .08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16);
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.pg-hero-title {
    margin: 0;
    color: #fff;
    font-size: clamp(2.7rem, 5.2vw, 5.1rem);
    font-weight: 950;
    letter-spacing: .035em;
    line-height: .88;
    text-transform: uppercase;
    white-space: nowrap;
    text-shadow: 0 8px 30px rgba(0, 0, 0, .42);
}

.pg-hero-claim {
    margin: 0;
    max-width: 700px;
    color: #f9bf19;
    font-size: clamp(1.05rem, 1.75vw, 1.38rem);
    font-weight: 800;
    line-height: 1.2;
}

.pg-hero-claim span { display: block; }

.pg-hero-meta {
    margin: 0;
    max-width: 660px;
    color: #fff;
    font-size: clamp(.92rem, 1.25vw, 1.04rem);
    font-weight: 650;
    line-height: 1.28;
}

.pg-hero-meta span,
.pg-hero-meta strong { display: block; }

.pg-hero-meta strong {
    font-size: 1.08em;
    font-weight: 900;
}

.pg-hero-glow {
    position: absolute;
    z-index: -3;
    border-radius: 999px;
    filter: blur(2px);
    opacity: .75;
}

.pg-hero-glow-primary {
    width: 260px;
    height: 260px;
    left: -72px;
    bottom: -92px;
    background: color-mix(in srgb, var(--hero-primary) 36%, transparent);
}

.pg-hero-glow-accent {
    width: 360px;
    height: 360px;
    right: -120px;
    top: -150px;
    background: rgba(248, 212, 122, .16);
}

.pg-hero-snow {
    position: absolute;
    inset: 0;
    z-index: -1;
    opacity: .42;
    background-image:
        radial-gradient(circle, rgba(255, 255, 255, .9) 0 1.5px, transparent 1.7px),
        radial-gradient(circle, rgba(255, 255, 255, .5) 0 1px, transparent 1.2px);
    background-position: 20px 30px, 80px 95px;
    background-size: 140px 150px, 190px 210px;
}

.pg-hero-visual {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    min-height: 250px;
}

.pg-ticket-card {
    position: absolute;
    right: 8%;
    top: 14%;
    width: min(52%, 240px);
    min-height: 142px;
    padding: 18px;
    transform: rotate(7deg);
    border: 1px solid rgba(248, 212, 122, .55);
    border-radius: 22px;
    color: #25150b;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .96), rgba(255, 247, 220, .9)),
        repeating-linear-gradient(90deg, rgba(127, 29, 29, .1) 0 8px, transparent 8px 16px);
    box-shadow: 0 22px 50px rgba(0, 0, 0, .28);
}

.pg-ticket-card::before,
.pg-ticket-card::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    background: #10151c;
}

.pg-ticket-card::before { left: -12px; }
.pg-ticket-card::after { right: -12px; }

.pg-ticket-label,
.pg-ticket-number,
.pg-ticket-line { display: block; }

.pg-ticket-label {
    color: #7f1d1d;
    font-size: .78rem;
    font-weight: 900;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.pg-ticket-number {
    margin-top: 14px;
    color: #151515;
    font-size: clamp(2rem, 4vw, 3.2rem);
    font-weight: 950;
    line-height: 1;
}

.pg-ticket-line {
    width: 78%;
    height: 9px;
    margin-top: 18px;
    border-radius: 999px;
    background: rgba(127, 29, 29, .18);
}

.pg-ticket-line-short { width: 48%; margin-top: 10px; }

.pg-lottery-drum {
    position: absolute;
    right: 30%;
    bottom: 0;
    width: min(46%, 220px);
    aspect-ratio: 1;
}

.pg-drum-body {
    position: absolute;
    inset: 14% 7% 24%;
    border: 10px solid rgba(248, 212, 122, .88);
    border-radius: 999px;
    background:
        radial-gradient(circle at 35% 30%, rgba(255, 255, 255, .7), transparent 18%),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, .16) 0 8px, transparent 8px 22px),
        linear-gradient(135deg, rgba(95, 13, 24, .94), rgba(26, 77, 46, .86));
    box-shadow: inset 0 0 30px rgba(255, 255, 255, .16), 0 22px 42px rgba(0, 0, 0, .25);
}

.pg-drum-body span { position: absolute; width: 20px; height: 20px; border-radius: 999px; background: var(--hero-warm); box-shadow: 0 0 14px rgba(255, 248, 231, .62); }
.pg-drum-body span:nth-child(1) { left: 30%; top: 28%; }
.pg-drum-body span:nth-child(2) { left: 55%; top: 44%; }
.pg-drum-body span:nth-child(3) { left: 38%; top: 62%; }

.pg-drum-stand {
    position: absolute;
    left: 46%;
    bottom: 11%;
    width: 9%;
    height: 27%;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(248, 212, 122, .9), rgba(145, 92, 28, .9));
}

.pg-drum-base {
    position: absolute;
    left: 24%;
    right: 24%;
    bottom: 7%;
    height: 13px;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent, rgba(248, 212, 122, .9), transparent);
}

.pg-ornament { position: absolute; border-radius: 999px; box-shadow: inset -10px -14px 24px rgba(0, 0, 0, .22), 0 18px 38px rgba(0, 0, 0, .24); }
.pg-ornament::before { content: ""; position: absolute; left: 50%; top: -22px; width: 2px; height: 24px; background: rgba(255, 255, 255, .38); }
.pg-ornament-red { right: 0; bottom: 22%; width: 66px; height: 66px; background: radial-gradient(circle at 30% 24%, #fff, transparent 14%), linear-gradient(135deg, #b91c1c, #5f0d18); }
.pg-ornament-gold { right: 62%; top: 7%; width: 48px; height: 48px; background: radial-gradient(circle at 30% 24%, #fff, transparent 15%), linear-gradient(135deg, #ffe8a3, #b7791f); }

.pg-hero-lights { position: absolute; inset: auto 6% 0 auto; display: flex; gap: 18px; }
.pg-hero-lights span { width: 12px; height: 12px; border-radius: 999px; background: var(--hero-gold); box-shadow: 0 0 20px rgba(248, 212, 122, .85); }
.pg-hero-lights span:nth-child(even) { background: #fca5a5; box-shadow: 0 0 20px rgba(252, 165, 165, .8); }

.group-info-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.group-info-card {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 14px;
    border: 1px solid rgba(245, 158, 11, .2);
    border-radius: 12px;
    background: #fdfaf2;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .05);
}

.group-info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(245, 158, 11, .14);
    font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", system-ui, sans-serif;
    font-size: 1.25rem;
    line-height: 1;
}

.group-info-copy h3 { margin: 0; color: #111827; font-size: .98rem; font-weight: 900; line-height: 1.2; }
.group-info-copy p { margin: 4px 0 0; color: #6b7280; font-size: .86rem; font-weight: 600; line-height: 1.3; }

.pg-card {
    display: grid;
    grid-template-columns: 132px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    min-width: 0;
    padding: 18px;
    border: 1px solid rgba(245, 158, 11, .34);
    border-radius: 8px;
    background: #fdfaf2;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .06);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.pg-card:hover { transform: translateY(-2px); border-color: rgba(245, 158, 11, .58); box-shadow: 0 14px 28px rgba(15, 23, 42, .1); }
.pg-card-media { display: flex; align-items: center; justify-content: center; min-width: 0; }
.pg-card-thumb { display: block; width: 132px; height: 88px; border: 1px solid rgba(245, 158, 11, .28); border-radius: 3px; object-fit: cover; background: #fff8e1; }
.pg-card-main { display: grid; gap: 8px; min-width: 0; }
.pg-card-number { color: #111827; font-size: clamp(2.25rem, 4vw, 3.15rem); font-weight: 950; letter-spacing: .04em; line-height: .95; }
.pg-card-draw { color: #4b5563; font-size: .95rem; font-weight: 700; }
.pg-card-breakdown { display: flex; flex-wrap: wrap; align-items: center; justify-items: center; gap: 6px; margin-top: 4px; color: #4b5563; font-size: .86rem; line-height: 1.25; }
.pg-card-breakdown strong { color: #111827; font-weight: 900; }
.pg-card-breakdown-symbol { color: #9ca3af; font-weight: 900; }
.pg-card-breakdown-total { color: #991b1b; font-weight: 900; }
.pg-card-breakdown-total strong { color: #991b1b; }
.pg-card-stock { width: fit-content; padding: 6px 10px; border: 1px solid rgba(var(--brand-primary-rgb, 34, 197, 94), .22); border-radius: 999px; background: rgba(var(--brand-primary-rgb, 34, 197, 94), .08); color: #374151; font-size: .82rem; font-weight: 800; line-height: 1.2; }
.pg-card-stock strong { color: #111827; font-weight: 950; }
.pg-card-stock--empty { border-color: #fecaca; background: #fff1f2; color: #991b1b; }
.pg-card-buy { grid-column: 1 / -1; display: grid; grid-template-columns: auto minmax(128px, 1fr); gap: 12px; align-items: center; margin-top: 4px; }
.pg-card-stepper { display: inline-flex; align-items: center; width: fit-content; border: 1px solid #d1d5db; border-radius: 8px; background: #fff; }
.pg-step-btn { width: 32px; height: 32px; border: 0; border-radius: 8px; background: #fff; color: #111827; font-size: 1.05rem; font-weight: 900; }
.pg-step-btn:hover { background: #f9fafb; }
.pg-step-btn:disabled, .pg-card-cta:disabled { cursor: not-allowed; opacity: .58; }
.pg-step-btn:focus-visible, .pg-card-cta:focus-visible { outline: 2px solid rgba(var(--brand-primary-rgb, 91, 99, 246), .85); outline-offset: 2px; }
.pg-card-quantity { min-width: 34px; text-align: center; color: #111827; font-weight: 900; }
.pg-card-cta { min-height: 34px; width: fit-content; min-width: 104px; border: 1px solid #991b1b; border-radius: 8px; padding: 0 12px; background: linear-gradient(180deg, #dc2626, #991b1b); color: #fff; font-weight: 900; box-shadow: 0 8px 18px rgba(153, 27, 27, .22); }
.pg-card-cta:hover { background: linear-gradient(180deg, #ef4444, #991b1b); }
.pg-card-cta:disabled:hover { background: linear-gradient(180deg, #dc2626, #991b1b); }

.group-public-footer {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    overflow: hidden;
    border: 0;
    border-radius: 0;
    background: #d80000;
    box-shadow: 0 14px 34px rgba(15, 23, 42, .06);
}
.group-public-footer__grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 22px; padding: 22px; }
.group-public-footer__col { min-width: 0; }
.group-public-footer__brand { display: flex; align-items: center; gap: 12px; }
.group-public-footer__logo, .group-public-footer__logo-fallback { flex: 0 0 auto; width: 54px; height: 54px; border: 1px solid rgba(245, 158, 11, .25); border-radius: 12px; background: #fff; }
.group-public-footer__logo { object-fit: contain; padding: 6px; }
.group-public-footer__logo-fallback { display: inline-flex; align-items: center; justify-content: center; color: #111827; font-weight: 900; letter-spacing: .04em; }
.group-public-footer h2, .group-public-footer h3, .group-public-footer p { margin: 0; }
.group-public-footer h2 { color: #fff; font-size: 1.1rem; font-weight: 900; line-height: 1.2; }
.group-public-footer h3 { margin-bottom: 10px; color: #fff; font-size: .95rem; font-weight: 900; }
.group-public-footer p, .group-public-footer address, .group-public-footer a { color: rgba(255, 255, 255, .82); font-size: .9rem; font-weight: 600; line-height: 1.45; }
.group-public-footer address { display: grid; gap: 5px; margin: 0; font-style: normal; }
.group-public-footer__links, .group-public-footer__social { display: grid; gap: 7px; }
.group-public-footer a { width: fit-content; text-decoration: none; }
.group-public-footer a:hover, .group-public-footer a:focus-visible { color: #fff; text-decoration: underline; }

.group-draw-tabs { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; max-width: 100%; overflow-x: hidden; }
.group-draw-tab { min-height: 40px; padding: 0 16px; border-radius: 8px; font-weight: 800; line-height: 1; white-space: nowrap; transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease; }
.group-draw-tab:hover { transform: translateY(-1px); }
.group-draw-tab:focus-visible { outline: 2px solid rgba(var(--brand-primary-rgb, 91, 99, 246), .85); outline-offset: 2px; }
.group-draw-tab--available { border: 1px solid #cbd5e1; background: #fff; color: #0f172a; }
.group-draw-tab--available.is-selected { border-color: var(--pg-primary, var(--brand-primary)); background: linear-gradient(180deg, var(--pg-primary, var(--brand-primary)), #0f172a); color: #fff; box-shadow: 0 6px 18px rgba(15, 23, 42, .2); }
.group-draw-tab--active { border: 1px solid rgba(127, 29, 29, .72); background: linear-gradient(180deg, #dc2626, #991b1b); color: #fff; box-shadow: 0 8px 20px rgba(153, 27, 27, .24); }
.group-draw-tab--inactive { border: 1px solid #d7deea; background: rgba(255, 255, 255, .92); color: #1f2937; box-shadow: 0 6px 16px rgba(15, 23, 42, .06); }

.group-delivery-modal__backdrop { position: fixed; inset: 0; z-index: 1050; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(15, 23, 42, 0.52); }
.group-delivery-modal { width: min(1120px, 100%); max-height: calc(100vh - 32px); overflow: auto; border-radius: 18px; box-shadow: 0 24px 80px rgba(15, 23, 42, 0.3); }
.group-delivery-modal__pickup-summary { display: grid; gap: 10px; max-height: 300px; overflow: auto; }

@media (max-width: 900px) {
    .pg-hero { grid-template-columns: 1fr; min-height: auto; padding: 24px; gap: 22px; }
    .pg-hero::after { background: linear-gradient(180deg, rgba(4, 10, 18, .86), rgba(4, 10, 18, .44)); }
    .pg-hero-title { font-size: clamp(2.35rem, 13vw, 4rem); white-space: normal; }
    .pg-hero-content { padding-left: 0; }
    .pg-hero-visual { min-height: 160px; transform: scale(.78); transform-origin: top center; }
    .group-info-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
    .pg-hero-christmas-image { display: none; }
}

@media (max-width: 720px) {
    .pg-hero { padding: 22px; border-radius: var(--radius-lg, 24px); }
    .pg-hero h1, .pg-hero-title { font-size: clamp(1.45rem, 7vw, 2rem); line-height: 1.08; max-width: 100%; overflow-wrap: anywhere; }
    .pg-hero-content { padding-left: 0; min-width: 0; }
    .pg-hero-kicker { font-size: .7rem; letter-spacing: .12em; }
    .pg-hero-claim { font-size: 1.05rem; }
    .pg-hero-meta { font-size: .92rem; }
    .pg-hero-visual { display: none; }
    .pg-card { grid-template-columns: 112px minmax(0, 1fr); padding: 14px; }
    .pg-card-thumb { width: 112px; height: 74px; }
    .pg-card-buy { grid-template-columns: auto minmax(0, 1fr); gap: 8px; }
    .pg-card-stepper { width: auto; justify-content: initial; }
    .pg-step-btn { width: 28px; height: 28px; font-size: .95rem; }
    .pg-card-quantity { min-width: 28px; font-size: .9rem; }
    .pg-card-cta { width: auto; min-width: 0; min-height: 30px; padding: 0 10px; font-size: .9rem; }
}

@media (max-width: 560px) {
    .group-info-grid { grid-template-columns: 1fr; gap: 10px; }
    .group-info-card { padding: 12px; }
    .group-public-footer__grid { grid-template-columns: 1fr; padding: 16px; }
    .group-draw-tabs { gap: 8px; }
    .group-draw-tab { min-height: 42px; padding: 0 14px; font-size: .92rem; }
    .group-delivery-modal__backdrop { align-items: stretch; padding: 0; }
    .group-delivery-modal { max-height: 100vh; border-radius: 0; }
}
