/* raffles1 (04-11-2026): /raffles, every raffle of the ecosystem in one place. The raffle cards are the Sponsored ones
   (.sp-card, spstyle1/spstats1/lastt1 in basc.css) in a balanced grid (.bal, gridfix1), plus the live countdown and
   «Remind me». BASC Lotto keeps its Sponsored look; BASC Radio and the winners are new. Classes rf-*. */

.rf { display: grid; gap: 56px; padding-bottom: 24px; }
.rf-sec { scroll-margin-top: 96px; }
.rf-sec .section-head { margin-bottom: 22px; }
.rf-eyebrow-hot { color: #ffb347; }

/* ---- Jump bar ---- */
.rf-jump { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.rf-jump a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; font-size: 0.9rem; font-weight: 700;
    color: #e2e8f0; background: var(--panel); border: 1px solid var(--line); transition: border-color .2s, background .2s, color .2s; }
.rf-jump a:hover { color: #fff; border-color: rgba(255,209,102,0.55); background: rgba(255,209,102,0.08); }
.rf-jump b { min-width: 22px; padding: 2px 7px; border-radius: 999px; font-size: 0.78rem; text-align: center; color: #111827; background: #ffd166; }
.rf-dot { width: 8px; height: 8px; border-radius: 50%; background: #ff5a5a; box-shadow: 0 0 0 0 rgba(255,90,90,0.6); animation: rf-ping 1.8s ease-out infinite; }
@keyframes rf-ping { 70% { box-shadow: 0 0 0 8px rgba(255,90,90,0); } 100% { box-shadow: 0 0 0 0 rgba(255,90,90,0); } }

/* ---- The raffle cards ---- */
.rf-grid { list-style: none; margin: 0; padding: 0; --bal-cols: 3; --bal-gap: 20px; }
.rf-card { align-items: stretch; padding: 16px 16px 18px; scroll-margin-top: 110px; }
.rf-card .sp-media { height: auto; aspect-ratio: 4 / 3; margin-bottom: 14px; }
.rf-card .sp-media.is-broken .sp-media-pic, .rf-card .sp-media.is-broken .sp-media-bg { visibility: hidden; }
.rf-card .sp-value b { font-size: clamp(24px, 2.6vw, 32px); }
.rf-title { margin: 0 0 10px; font-size: 1.12rem; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; }
.rf-card .sp-stats { margin-bottom: 14px; }
.rf-card .sp-stat { padding: 8px 10px 9px; }
.rf-card .sp-stat > span { font-size: 12px; letter-spacing: 0.05em; }
.rf-card .sp-stat b { font-size: 1rem; }
.rf-card.is-soon { box-shadow: 0 0 26px rgba(255,140,0,0.2), inset 0 0 0 1px rgba(255,255,255,0.1), 0 16px 40px rgba(0,0,0,0.32); }
.rf-card.is-closed { opacity: 0.55; filter: saturate(0.6); }
.rf-card.is-closed .rf-get { pointer-events: none; }
:target.rf-card { animation: rf-arrive 2.4s ease-out 1; }
@keyframes rf-arrive { 0%, 30% { box-shadow: 0 0 0 3px #ffd166, 0 0 40px rgba(255,209,102,0.55); } 100% { box-shadow: inset 0 0 0 1px rgba(255,255,255,0.1), 0 16px 40px rgba(0,0,0,0.32); } }

/* the countdown: amber to red in the last 6 hours (raffles.js sets --cd, as the calendar's cdheat1) */
.rf-cd { font-variant-numeric: tabular-nums; }
.rf-cd.cd-soon { display: inline-flex; align-items: center; gap: 6px; color: var(--cd, #ff8c00); }
.rf-cd.cd-soon::before { content: ''; flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--cd, #ff8c00); animation: rf-blink 1.6s ease-in-out infinite; }
.rf-cd.cd-hot::before { animation-duration: 0.9s; }
@keyframes rf-blink { 50% { opacity: 0.25; } }

.rf-actions { display: flex; gap: 8px; margin-top: auto; align-self: stretch; }
.rf-actions .sp-cta { flex: 1 1 auto; min-width: 0; justify-content: center; white-space: nowrap; }
.rf-out { margin-left: 2px; font-weight: 900; opacity: 0.8; }
.rf-remind { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: 7px; max-width: 100%; padding: 10px 13px; border-radius: 10px;
    font: inherit; font-size: 0.9rem; font-weight: 800; line-height: 1.2; color: #e2e8f0; cursor: pointer; text-align: center;
    background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.18); transition: color .2s, border-color .2s, background .2s, transform .2s; }
.rf-remind:hover, .rf-remind:focus-visible { color: #fff; border-color: rgba(255,209,102,0.6); background: rgba(255,209,102,0.08); transform: translateY(-1px); }
.rf-remind svg { flex: none; }
.rf-remind.is-on { color: #1a0b38; background: linear-gradient(135deg, #ffd166, #ffb347); border-color: #ffd166; }
.rf-remind.is-on:hover { color: #1a0b38; background: linear-gradient(135deg, #ffe08a, #ffc266); }
.rf-remind.is-busy { opacity: 0.6; pointer-events: none; }
.rf-remind.is-error { color: #fecaca; border-color: rgba(248,113,113,0.6); background: rgba(248,113,113,0.1); }
.rf-remind.is-ring svg { animation: rf-ring .9s ease-in-out 1; transform-origin: 50% 10%; }
@keyframes rf-ring { 15% { transform: rotate(18deg); } 30% { transform: rotate(-16deg); } 45% { transform: rotate(12deg); } 60% { transform: rotate(-8deg); } 75% { transform: rotate(4deg); } }
.rf-link { gap: 4px; }

.rf-more { display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; border-radius: 10px; font-weight: 800; font-size: 0.92rem; color: #7be8ff;
    border: 1px solid rgba(20,217,255,0.4); background: rgba(20,217,255,0.06); transition: background .2s, color .2s; }
.rf-more:hover { color: #fff; background: rgba(20,217,255,0.14); }
.rf-none { margin: 0; color: var(--muted); }
.rf-empty { display: grid; justify-items: center; gap: 10px; padding: 40px 20px; text-align: center; border-radius: var(--radius); background: var(--panel); border: 1px dashed var(--line-strong); }
.rf-empty h3 { margin: 4px 0 0; font-size: 1.2rem; }
.rf-empty p { margin: 0 0 6px; max-width: 460px; color: var(--muted); }
.rf-empty-icon { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 18px; color: #ffd166; background: rgba(255,209,102,0.1); border: 1px solid rgba(255,209,102,0.35); }

/* ---- BASC Lotto and BASC Radio, side by side ---- */
.rf-duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: stretch; }
.rf-duo.is-single { grid-template-columns: minmax(0, 640px); justify-content: center; }
.rf-duo > section { scroll-margin-top: 96px; }
.rf-lotto { align-items: stretch; }
.rf-lotto .sp-head { margin-bottom: 8px; }
.rf-lotto h2.sp-jackpot { margin: 0 0 12px; font-weight: 400; }
.rf-lotto .sp-pool { align-self: flex-start; }
.rf-lotto-stats { margin-top: 2px; }
.rf-lotto-next { margin: -4px 0 12px; font-size: 0.88rem; }
.rf-radio { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 22px; border-radius: 14px; overflow: hidden; isolation: isolate;
    background: radial-gradient(420px 220px at 100% 0%, rgba(236,72,153,0.22), transparent 70%), radial-gradient(360px 220px at 0% 100%, rgba(0,221,235,0.14), transparent 70%),
        linear-gradient(135deg, rgba(22,8,46,0.95), rgba(12,6,28,0.95));
    border: 1px solid rgba(236,72,153,0.38); box-shadow: 0 16px 40px rgba(0,0,0,0.32), inset 0 0 0 1px rgba(255,255,255,0.06); }
.rf-radio-top { display: flex; align-items: center; gap: 14px; }
.rf-radio-top h2 { margin: 4px 0 0; font-size: clamp(1.5rem, 2.6vw, 1.9rem); font-weight: 900; line-height: 1.1; }
.rf-radio-top h2 .o { color: #f472b6; }
.rf-radio-top .eyebrow { color: #f9a8d4; }
.rf-radio-ico { display: grid; place-items: center; flex: none; width: 54px; height: 54px; border-radius: 16px; font-size: 1.7rem; font-style: normal; line-height: 1;
    background: rgba(236,72,153,0.14); border: 1px solid rgba(236,72,153,0.4); }
.rf-live { margin-left: auto; display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px; border-radius: 999px; font-size: 0.8rem; font-weight: 900;
    letter-spacing: 0.06em; text-transform: uppercase; color: #fff; background: rgba(34,197,94,0.2); border: 1px solid rgba(34,197,94,0.6); white-space: nowrap; }
.rf-live i { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 10px #22c55e; animation: rf-blink 1.4s ease-in-out infinite; }
.rf-radio-prize { margin: 0; display: grid; gap: 2px; }
.rf-radio-prize b { font-size: 1.2rem; font-weight: 900; line-height: 1.3; overflow-wrap: anywhere; }
.rf-radio-prize small { color: var(--muted); font-size: 0.88rem; }
.rf-radio-rules { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.rf-radio-rules li { display: grid; gap: 3px; padding: 9px 12px; border-radius: 10px; background: rgba(6,8,18,0.42); border: 1px solid rgba(255,255,255,0.12); min-width: 0; }
.rf-radio-rules span { font-size: 12px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; color: #f9a8d4; }
.rf-radio-rules b { font-size: 1rem; font-weight: 800; overflow-wrap: anywhere; }
.rf-radio-text, .rf-radio-how { margin: 0; color: #d7deea; }
.rf-radio-how { font-size: 0.9rem; color: var(--muted); }
.rf-radio-how code { padding: 2px 7px; border-radius: 6px; font-size: 0.86rem; color: #fff; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.14); }
.rf-cta-radio { color: #fce7f3; border-color: rgba(236,72,153,0.7); background: linear-gradient(135deg, rgba(236,72,153,0.32), rgba(99,102,241,0.24)); }
.rf-cta-radio:hover, .rf-cta-radio:focus-visible { box-shadow: 0 0 20px rgba(236,72,153,0.32); }

/* ---- Latest winners ---- */
.rf-winners { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; }
.rf-win { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 10px 14px 10px 10px; border-radius: 14px;
    background: var(--panel); border: 1px solid var(--line); }
.rf-win-pic { position: relative; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 12px; overflow: visible;
    background: linear-gradient(135deg, rgba(255,209,102,0.16), rgba(20,217,255,0.12)); border: 1px solid rgba(255,255,255,0.14); }
.rf-win-pic img { width: 100%; height: 100%; object-fit: cover; border-radius: 11px; }
.rf-win-pic i { position: absolute; right: -6px; bottom: -6px; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; font-size: 0.78rem;
    font-style: normal; line-height: 1; background: #1a0b38; border: 2px solid #ffd166; }
.rf-win--radio .rf-win-pic i { border-color: #f472b6; }
.rf-win-pic:not(:has(img)) i { position: static; width: auto; height: auto; border: 0; background: none; font-size: 1.5rem; }
.rf-win-text { display: grid; gap: 2px; min-width: 0; }
.rf-win-prize { font-size: 0.98rem; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rf-win-text small { font-size: 0.86rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rf-win-text small a, .rf-win-text small span { color: #ffd166; font-weight: 700; }
.rf-win-text small a:hover { text-decoration: underline; }
.rf-win-meta { display: grid; justify-items: end; gap: 2px; font-size: 0.8rem; color: var(--muted); white-space: nowrap; }
.rf-win-meta em { font-style: normal; font-weight: 700; color: #c4b5fd; }
.rf-win--radio .rf-win-meta em { color: #f9a8d4; }

.rf-note { margin: -24px 0 0; font-size: 0.84rem; color: var(--muted); text-align: center; }

@media (max-width: 1100px) { .rf-grid { --bal-cols: 2; } }
@media (max-width: 860px) {
    .rf-duo, .rf-winners { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
    .rf { gap: 44px; }
    .rf-grid { --bal-cols: 1; --bal-gap: 16px; }
    .rf-jump { flex-wrap: nowrap; overflow-x: auto; margin: 4px -16px 0; padding: 0 16px 4px; scrollbar-width: none; }
    .rf-card .sp-media { aspect-ratio: 16 / 11; }
    .rf-title { min-height: 0; }
    .rf-card .sp-stats { gap: 6px; }
    .rf-card .sp-stat { padding: 8px 8px 9px; }
    .rf-card .sp-stat b { font-size: 0.95rem; }
    .rf-cd.cd-soon { gap: 4px; }
    .rf-jump::-webkit-scrollbar { display: none; }
    .rf-jump a { flex: none; }
    .rf-actions { flex-wrap: wrap; }
    .rf-actions .rf-remind { flex: 1 1 auto; }
    .rf-radio { padding: 18px 16px; }
    .rf-radio-top { flex-wrap: wrap; gap: 12px; }
    .rf-radio-top > div { flex: 1 1 calc(100% - 80px); min-width: 0; }
    .rf-radio-top .eyebrow { white-space: nowrap; }
    .rf-live { order: 3; margin: -4px 0 0 68px; }
    .rf-radio-rules li { padding: 8px 10px; }
    .rf-win { grid-template-columns: auto minmax(0, 1fr); }
    .rf-win-meta { grid-column: 2; display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 4px 10px; margin-top: -6px; }
}
@media (prefers-reduced-motion: reduce) {
    .rf-dot, .rf-cd.cd-soon::before, .rf-live i, :target.rf-card, .rf-remind.is-ring svg { animation: none; }
    .rf-remind, .rf-remind:hover { transition: none; transform: none; }
}
