/* Fair Draw for Lottery: draw page */
.fdl-draw { --fdl-green: var(--pg-accent, var(--wp--preset--color--primary, var(--e-global-color-primary, currentColor))); --fdl-gold: var(--fdl-green); --fdl-red: var(--pg-danger, var(--wp--preset--color--vivid-red, #cf2e2e)); --fdl-on: var(--pg-bg, Canvas); --fdl-panel: color-mix(in srgb, currentColor 6%, transparent); --fdl-navy: color-mix(in srgb, currentColor 9%, transparent); --fdl-line: color-mix(in srgb, currentColor 20%, transparent); --fdl-muted: color-mix(in srgb, currentColor 68%, transparent); font-family: inherit; max-width: 880px; margin: 0 auto; padding: 24px 16px 56px; color: inherit; box-sizing: border-box; }
.fdl-draw button, .fdl-draw input, .fdl-draw a { font-family: inherit; }
.fdl-draw *, .fdl-draw *::before, .fdl-draw *::after { box-sizing: border-box; }

/* ---------- Header ---------- */
.fdl-head { text-align: center; margin-bottom: 18px; }
.fdl-kicker { margin: 0; text-transform: uppercase; letter-spacing: .14em; font-size: .8rem; color: var(--fdl-green); font-weight: 700; }
.fdl-head h1 { margin: 6px 0 0; font-size: clamp(1.5rem, 5vw, 2.3rem); line-height: 1.1; }

.fdl-live { display: inline-flex; align-items: center; gap: 6px; margin-left: 8px; padding: 3px 12px 3px 9px; border-radius: 999px; background: var(--fdl-red); color: #fff; font-size: .8rem; letter-spacing: .1em; vertical-align: middle; }
.fdl-live[hidden] { display: none; }
.fdl-live i { width: 10px; height: 10px; border-radius: 50%; background: #fff; animation: fdl-blink 1s ease-in-out infinite; }
.fdl-live.fdl-replay { background: var(--fdl-muted); }
.fdl-live.fdl-replay i { animation: none; opacity: .6; }
@keyframes fdl-blink { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .15; transform: scale(.7); } }

/* ---------- Prize + key facts (image left on every screen size) ---------- */
.fdl-top { display: grid; grid-template-columns: 220px 1fr; gap: 20px; align-items: center; background: var(--fdl-panel); border: 1px solid var(--fdl-line); border-radius: 16px; padding: 16px; margin-bottom: 16px; }
.fdl-top-img img { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 12px; border: 2px solid var(--fdl-green); }
.fdl-top-info { min-width: 0; }
.fdl-pill { display: inline-block; padding: 4px 14px; border-radius: 999px; background: var(--fdl-line); color: inherit; font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 12px; }
.fdl-pill-live { background: var(--fdl-red); color: #fff; animation: fdl-pillpulse 1.2s ease-in-out infinite; }
.fdl-pill-done { background: var(--fdl-green); color: var(--fdl-on); }
@keyframes fdl-pillpulse { 50% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--fdl-red) 35%, transparent); } }

.fdl-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; margin: 0; }
.fdl-fact { margin: 0; min-width: 0; }
.fdl-fact-wide { grid-column: 1 / -1; }
.fdl-fact dt { margin: 0 0 2px; font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--fdl-muted); }
.fdl-fact dd { margin: 0; font-size: 1rem; color: inherit; overflow-wrap: anywhere; }
.fdl-fact dd b { font-size: 1.6rem; line-height: 1.1; color: var(--fdl-gold); font-variant-numeric: tabular-nums; }
.fdl-fact dd span { color: var(--fdl-muted); }
.fdl-bar { display: block; height: 8px; margin-top: 8px; border-radius: 999px; background: var(--fdl-line); overflow: hidden; }
.fdl-bar i { display: block; height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, var(--fdl-green), var(--fdl-gold)); transition: width 1s ease; }

/* ---------- The show ---------- */
.fdl-card { position: relative; overflow: hidden; background: var(--fdl-navy); color: inherit; border-radius: 16px; padding: 24px 16px; text-align: center; border: 2px solid var(--fdl-green); }
.fdl-caption { font-size: clamp(1.1rem, 4vw, 1.5rem); font-weight: 700; margin: 8px 0; min-height: 1.6em; }
.fdl-countdown { font-size: clamp(1.8rem, 8vw, 3rem); font-weight: 800; color: var(--fdl-gold); font-variant-numeric: tabular-nums; }
.fdl-entries { margin: 4px 0 12px; color: var(--fdl-muted); }

.fdl-chips { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; min-height: 0; max-height: 420px; overflow: hidden; margin: 8px 0; transition: opacity .4s, max-height 1.4s ease, margin 1.4s ease; }
.fdl-chips.fdl-collapsed { max-height: 0; margin-top: 0; margin-bottom: 0; opacity: 0 !important; }
.fdl-chip { background: var(--fdl-panel); border: 1px solid var(--fdl-green); border-radius: 8px; padding: 2px 8px; font-size: .85rem; font-variant-numeric: tabular-nums; transition: transform .5s ease; }
/* Big boards (hundreds of tickets): small cells, clipped height, view follows the numbers as they load. */
.fdl-chips.fdl-dense { gap: 2px; max-height: 280px; }
.fdl-chips.fdl-dense.fdl-collapsed { max-height: 0; }
.fdl-dense .fdl-chip { padding: 0 3px; font-size: .62rem; line-height: 1.5; border-radius: 4px; }

.fdl-drums { display: flex; gap: 8px; justify-content: center; margin: 12px 0; opacity: 0; transition: opacity .4s; }
.fdl-drum { display: inline-flex; align-items: center; justify-content: center; width: clamp(56px, 18vw, 92px); height: clamp(76px, 24vw, 120px); font-size: clamp(2.6rem, 11vw, 4.6rem); font-weight: 800; font-variant-numeric: tabular-nums; background: var(--fdl-on); color: inherit; border-radius: 12px; border: 4px solid var(--fdl-gold); box-shadow: inset 0 -10px 18px color-mix(in srgb, currentColor 15%, transparent); }
.fdl-drum.fdl-locked { background: var(--fdl-gold); color: var(--fdl-on); border-color: var(--fdl-on); }
.fdl-scan .fdl-drum { animation: fdl-pulse .8s ease-in-out infinite; }
@keyframes fdl-pulse { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--fdl-green) 60%, transparent); } }

.fdl-winner { margin-top: 12px; }
.fdl-winner-name { font-size: clamp(1.3rem, 5vw, 1.9rem); font-weight: 800; color: var(--fdl-gold); margin: 8px 0; }
.fdl-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }
.fdl-btn { display: inline-block; background: var(--fdl-green); color: var(--fdl-on); border: 0; border-radius: 999px; padding: 12px 24px; font-weight: 700; cursor: pointer; text-decoration: none; font-size: 1rem; }
.fdl-btn[hidden] { display: none; }
.fdl-btn:hover, .fdl-btn:focus { filter: brightness(1.1); color: var(--fdl-on); }
.fdl-btn-alt { background: var(--fdl-red); color: inherit; }
.fdl-confetti { position: absolute; inset: 0; pointer-events: none; }

/* ---------- How we keep it fair ---------- */
.fdl-fair { margin-top: 32px; }
.fdl-fair h2, .fdl-secure h2 { margin: 0 0 14px; font-size: 1.3rem; }
.fdl-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.fdl-steps li { position: relative; background: var(--fdl-panel); border: 1px solid var(--fdl-line); border-radius: 14px; padding: 16px 14px 14px; }
.fdl-step-no { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; background: var(--fdl-green); color: var(--fdl-on); font-weight: 800; margin-bottom: 8px; }
.fdl-steps h3 { margin: 0 0 6px; font-size: 1rem; color: inherit; }
.fdl-steps p { margin: 0; font-size: .88rem; line-height: 1.45; color: var(--fdl-muted); }

/* ---------- Security details ---------- */
.fdl-secure { margin-top: 28px; background: var(--fdl-panel); border: 1px solid var(--fdl-line); border-radius: 16px; padding: 18px 16px 16px; }
.fdl-secure-head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 12px; }
.fdl-secure-head h2 { margin: 0 0 2px; }
.fdl-secure-head p { margin: 0; font-size: .88rem; color: var(--fdl-muted); }
.fdl-lock { flex: none; color: var(--fdl-green); margin-top: 2px; }
.fdl-sec-row { padding: 12px 0; border-top: 1px solid var(--fdl-line); }
.fdl-sec-label { font-size: .78rem; text-transform: uppercase; letter-spacing: .09em; color: var(--fdl-muted); margin-bottom: 6px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.fdl-sec-value { display: flex; gap: 8px; align-items: stretch; flex-wrap: wrap; }
.fdl-sec-note { margin-top: 6px; font-size: .8rem; color: var(--fdl-muted); }
.fdl-hash { flex: 1 1 260px; min-width: 0; display: block; padding: 9px 11px; background: var(--fdl-panel); border: 1px solid var(--fdl-line); border-radius: 8px; color: inherit; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .78rem; line-height: 1.35; word-break: break-all; }
.fdl-hash[hidden] { display: none; }
.fdl-wait { flex: 1 1 260px; padding: 9px 11px; border: 1px dashed var(--fdl-line); border-radius: 8px; color: var(--fdl-muted); font-size: .85rem; }
.fdl-wait[hidden] { display: none; }
.fdl-formula { display: block; width: 100%; padding: 9px 11px; background: var(--fdl-panel); border: 1px solid var(--fdl-line); border-radius: 8px; color: inherit; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .78rem; line-height: 1.45; }
.fdl-copy { flex: none; align-self: stretch; background: var(--fdl-line); color: inherit; border: 1px solid var(--fdl-line); border-radius: 8px; padding: 0 14px; font-weight: 700; font-size: .8rem; cursor: pointer; }
.fdl-copy[hidden] { display: none; }
.fdl-copy:hover { background: color-mix(in srgb, currentColor 28%, transparent); }
.fdl-tag { font-style: normal; font-size: .68rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; background: var(--fdl-line); color: var(--fdl-muted); }
.fdl-tag-ok { background: color-mix(in srgb, var(--fdl-green) 20%, transparent); color: inherit; }
.fdl-sec-actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; padding-top: 14px; border-top: 1px solid var(--fdl-line); }
.fdl-link { color: var(--fdl-green); font-weight: 700; }
.fdl-checks { list-style: none; padding: 0; margin: 10px 0 0; }
.fdl-checks li { padding: 6px 10px; margin-top: 6px; border-radius: 8px; background: var(--fdl-panel); }
.fdl-ok { color: var(--fdl-green); }
.fdl-bad { color: var(--fdl-red); font-weight: 700; }

.fdl-all { margin: 8px 0 0; font-size: .85rem; }
.fdl-all a { color: var(--fdl-green); font-weight: 700; text-decoration: none; }
.fdl-all a:hover { text-decoration: underline; }

/* ---------- /draws/ : all prizes as a grid ---------- */
.fdl-index { max-width: 1100px; }
.fdl-index-lead { margin: 8px auto 0; max-width: 560px; color: var(--fdl-muted); }
.fdl-index-section { margin-top: 28px; }
.fdl-index-section h2 { margin: 0 0 12px; font-size: 1.25rem; }
.fdl-index-section h2 span { display: inline-block; margin-left: 6px; padding: 1px 9px; border-radius: 999px; background: var(--fdl-line); color: var(--fdl-muted); font-size: .8rem; vertical-align: middle; }
.fdl-index-empty { text-align: center; color: var(--fdl-muted); margin-top: 32px; }
.fdl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.fdl-gcard { display: flex; flex-direction: column; background: var(--fdl-panel); border: 1px solid var(--fdl-line); border-radius: 16px; overflow: hidden; }
.fdl-gcard--live { border-color: var(--fdl-red); box-shadow: 0 0 0 2px color-mix(in srgb, var(--fdl-red) 35%, transparent); }
.fdl-gcard__img { display: block; aspect-ratio: 1 / 1; background: var(--fdl-panel); }
.fdl-gcard__img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.fdl-gcard__body { display: flex; flex-direction: column; flex: 1; padding: 14px; }
.fdl-gcard__body .fdl-pill { align-self: flex-start; margin-bottom: 8px; }
.fdl-pill-test { background: var(--fdl-line); color: inherit; }
.fdl-gcard h3 { margin: 0 0 6px; font-size: 1.05rem; line-height: 1.2; }
.fdl-gcard h3 a { color: inherit; text-decoration: none; }
.fdl-gcard__count { margin: 0 0 4px; color: var(--fdl-muted); font-size: .85rem; }
.fdl-gcard__count b { color: var(--fdl-gold); font-size: 1.2rem; font-variant-numeric: tabular-nums; }
.fdl-gcard .fdl-bar { margin: 4px 0 10px; }
.fdl-gcard__winner { margin: 0 0 4px; color: var(--fdl-gold); font-weight: 700; }
.fdl-gcard__winner em { font-style: normal; color: var(--fdl-muted); font-weight: 600; }
.fdl-gcard__when { margin: 0 0 12px; font-size: .8rem; color: var(--fdl-muted); }
.fdl-gcard .fdl-btn { margin-top: auto; text-align: center; }
.fdl-btn-sm { padding: 9px 16px; font-size: .9rem; }

/* ---------- Tablet / phone ---------- */
@media (max-width: 760px) {
	.fdl-steps { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
	.fdl-draw { padding: 16px 12px 40px; }
	/* Image stays on the left, small, with the key facts on the right. */
	.fdl-top { grid-template-columns: 104px 1fr; gap: 12px; padding: 12px; align-items: start; }
	.fdl-pill { margin-bottom: 8px; padding: 3px 10px; font-size: .7rem; }
	.fdl-facts { gap: 8px 10px; }
	.fdl-fact dt { font-size: .62rem; }
	.fdl-fact dd { font-size: .85rem; }
	.fdl-fact dd b { font-size: 1.2rem; }
	.fdl-bar { height: 6px; margin-top: 5px; }
	/* Draw grid: one column, small image on the left like the draw page. */
	.fdl-grid { grid-template-columns: 1fr; gap: 10px; }
	.fdl-gcard { flex-direction: row; }
	.fdl-gcard__img { flex: none; width: 104px; height: 104px; aspect-ratio: 1 / 1; align-self: flex-start; margin: 10px 0 10px 10px; border-radius: 10px; overflow: hidden; }
	.fdl-gcard__body { padding: 10px 12px; min-width: 0; }
	.fdl-gcard .fdl-btn { margin-top: 6px; align-self: flex-start; }
	/* Steps: number on the left, text on the right, so the list stays short. */
	.fdl-steps { grid-template-columns: 1fr; gap: 8px; }
	.fdl-steps li { display: grid; grid-template-columns: 34px 1fr; column-gap: 10px; padding: 12px; align-items: start; }
	.fdl-step-no { grid-row: 1 / span 2; margin: 0; }
	.fdl-steps h3 { margin: 0 0 2px; }
	/* Fingerprints: Copy stays beside the value instead of dropping below it. */
	.fdl-sec-value { flex-wrap: nowrap; }
	.fdl-hash, .fdl-wait { flex: 1 1 0; }
	.fdl-copy { padding: 0 10px; }
}

@media (prefers-reduced-motion: reduce) {
	.fdl-chip, .fdl-chips, .fdl-drums, .fdl-bar i { transition: none; }
	.fdl-scan .fdl-drum { animation: none; }
	.fdl-live i, .fdl-pill-live { animation: none; }
}

/* ---------- All-draws tabs ---------- */
.fdl-tabs { display: flex; gap: 8px; justify-content: center; margin: 18px 0 22px; flex-wrap: wrap; }
.fdl-tab { padding: 8px 18px; border-radius: 999px; background: var(--fdl-panel); border: 1px solid var(--fdl-line); color: inherit; text-decoration: none; font-weight: 700; font-size: .9rem; }
.fdl-tab.is-active { background: var(--fdl-green); color: var(--fdl-on); border-color: var(--fdl-green); }

/* ---------- Plugin page template (Draws page) ---------- */
.fdl-page { --fdl-green: var(--pg-accent, var(--wp--preset--color--primary, var(--e-global-color-primary, currentColor))); --fdl-line: color-mix(in srgb, currentColor 20%, transparent); --fdl-muted: color-mix(in srgb, currentColor 68%, transparent); }
.fdl-hero { padding: clamp(40px, 8vw, 88px) 16px clamp(28px, 5vw, 48px); text-align: center; background: color-mix(in srgb, currentColor 5%, transparent); border-bottom: 1px solid var(--fdl-line); }
.fdl-hero__inner { max-width: 760px; margin: 0 auto; }
.fdl-hero .fdl-kicker { color: var(--fdl-green); }
.fdl-hero__title { margin: 8px 0 0; font-size: clamp(2rem, 6vw, 3.4rem); line-height: 1.1; }
.fdl-hero__lead { margin: 14px auto 0; max-width: 560px; color: var(--fdl-muted); font-size: 1.05rem; line-height: 1.5; }
.fdl-page__body > .fdl-draw, .fdl-page__body .fdl-draw { padding-top: 32px; }

/* ---------- Entry-list style tabs and cards (theme colours) ---------- */
.fdl-tabs { justify-content: flex-start; gap: 10px; margin: 8px 0 24px; }
.fdl-tab { padding: 10px 22px; border-radius: 6px; background: transparent; border: 1px solid var(--fdl-line); font-weight: 500; font-size: .9rem; }
.fdl-tab.is-active { background: transparent; color: inherit; border: 2px solid var(--fdl-green); padding: 9px 21px; box-shadow: 0 0 0 3px color-mix(in srgb, var(--fdl-green) 18%, transparent); }
.fdl-grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.fdl-gcard { position: relative; border-radius: 10px; background: transparent; }
.fdl-gcard__img { position: relative; background: var(--fdl-panel); aspect-ratio: 4 / 3.2; }
.fdl-gcard__img .fdl-pill { position: absolute; top: 12px; left: 12px; margin: 0; padding: 4px 12px; background: var(--fdl-on); color: var(--fdl-green); border: 1px solid var(--fdl-line); font-size: .7rem; }
.fdl-gcard__img .fdl-pill-live { background: var(--fdl-on); color: var(--fdl-red); animation: none; }
.fdl-gcard__img .fdl-pill-live::before, .fdl-gcard__img .fdl-pill-done::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: currentColor; vertical-align: 1px; }
.fdl-gcard__img .fdl-pill-done { background: var(--fdl-on); color: var(--fdl-green); }
.fdl-gcard__body { padding: 16px; background: var(--fdl-panel); }
.fdl-gcard__cat { margin: 0 0 4px; font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--fdl-muted); }
.fdl-gcard h3 { margin: 0 0 8px; font-size: 1.05rem; text-transform: uppercase; letter-spacing: .01em; }
.fdl-gcard__count { font-size: .88rem; }
.fdl-gcard__count b { color: var(--fdl-green); font-size: 1.15rem; }
.fdl-gcard .fdl-bar { height: 4px; margin: 6px 0 12px; }
.fdl-gcard__when { display: flex; align-items: center; gap: 6px; margin: 0 0 14px; font-size: .85rem; }
.fdl-gcard__winner { color: inherit; }
.fdl-pill-inline { align-self: flex-start; margin-bottom: 8px; }
.fdl-btn-outline { display: flex; align-items: center; justify-content: center; gap: 10px; background: transparent; color: inherit; border: 1px solid var(--fdl-line); border-radius: 6px; padding: 12px 16px; font-size: .78rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.fdl-btn-outline:hover, .fdl-btn-outline:focus { filter: none; color: inherit; border-color: var(--fdl-green); }
@media (max-width: 560px) {
	.fdl-gcard { flex-direction: column; }
	.fdl-gcard__img { width: 100%; height: auto; margin: 0; border-radius: 0; aspect-ratio: 16 / 10; }
	.fdl-gcard .fdl-btn { align-self: stretch; }
}
