/* Колесо фортуни для стримерів: кабінет (/wheel) і екран розіграшу (/wheel/spin). */

.whl-page { max-width: 960px; margin: 0 auto; padding: 0 16px 64px; }

.whl-section { margin-top: 32px; }
.whl-section-title { font-size: 18px; font-weight: 700; margin: 0 0 8px; }
.whl-subsection-title { font-size: 15px; font-weight: 600; margin: 20px 0 8px; }
.whl-hint { color: var(--fc-muted, #9d9da8); font-size: 13px; margin: 0 0 12px; }
.whl-muted { color: var(--fc-muted, #9d9da8); font-size: 13px; font-weight: 400; }

.whl-input {
    width: 100%;
    background: var(--fc-bg, #0e0e10);
    border: 1px solid var(--fc-border, #2d2d33);
    border-radius: 8px;
    color: inherit;
    padding: 8px 10px;
    font: inherit;
}
.whl-input:focus { outline: none; border-color: var(--fc-accent, #9146ff); }
/* Нативна іконка календаря темна — на темному тлі невидима. */
.whl-input::-webkit-calendar-picker-indicator {
    filter: invert(1) brightness(1.8);
    opacity: .65;
    cursor: pointer;
}
.whl-input::-webkit-calendar-picker-indicator:hover { opacity: 1; }

.whl-btn { cursor: pointer; }

.whl-integrations { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.whl-integration {
    background: var(--fc-panel, #18181b);
    border: 1px solid var(--fc-border, #2d2d33);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
}
.whl-integration-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.whl-integration-name { font-weight: 700; }
.whl-status { font-size: 12px; color: var(--fc-muted, #9d9da8); }
.whl-status.is-on { color: #38c172; }
.whl-integration-controls { display: flex; flex-direction: column; gap: 8px; }

.whl-form {
    background: var(--fc-panel, #18181b);
    border: 1px solid var(--fc-border, #2d2d33);
    border-radius: 12px;
    padding: 16px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    align-items: end;
}
.whl-field label { display: block; font-size: 12px; color: var(--fc-muted, #9d9da8); margin-bottom: 4px; }
.whl-field-wide { grid-column: span 2; }

.whl-error {
    background: #3a1216;
    border: 1px solid #7a2730;
    border-radius: 8px;
    padding: 10px 14px;
    margin-top: 12px;
}
.whl-warnblock {
    background: #2b2313;
    border: 1px solid #6e5a1e;
    border-radius: 8px;
    padding: 10px 14px;
}

.whl-results { margin-top: 20px; }
.whl-summary { color: var(--fc-muted, #9d9da8); margin-bottom: 12px; }
.whl-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--fc-panel, #18181b);
    border: 1px solid var(--fc-border, #2d2d33);
    border-radius: 12px;
    overflow: hidden;
}
.whl-table th, .whl-table td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--fc-border, #2d2d33); }
.whl-table th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--fc-muted, #9d9da8); }
.whl-table tr:last-child td { border-bottom: none; }
.whl-num { text-align: right; font-variant-numeric: tabular-nums; }
.whl-note { font-size: 12px; color: #f5b83d; }
.whl-chancebar {
    display: inline-block;
    height: 6px;
    background: var(--fc-accent, #9146ff);
    border-radius: 3px;
    vertical-align: middle;
    margin-right: 8px;
}

.whl-row { display: flex; gap: 10px; align-items: center; margin-top: 12px; flex-wrap: wrap; }
.whl-flash { color: #38c172; font-size: 13px; opacity: 0; transition: opacity .2s; }
.whl-flash.is-visible { opacity: 1; }
.whl-pool-name { max-width: 240px; }
.whl-pool-tickets { max-width: 90px; text-align: right; }
.whl-mini-del {
    background: none;
    border: 1px solid var(--fc-border, #2d2d33);
    color: var(--fc-muted, #9d9da8);
    border-radius: 6px;
    padding: 3px 10px;
    font-size: 13px;
    cursor: pointer;
}
.whl-mini-del:hover { color: #f66; border-color: #7a2730; background: #3a1216; }

/* ---- сторінка розіграшу ---- */

.whl-spin-page { padding: 16px; }
.whl-empty-pool { text-align: center; padding: 64px 16px; display: grid; gap: 16px; justify-items: center; }
.whl-spin-layout {
    display: grid;
    /* колесо — головне: широка колонка, панель праворуч компактна */
    grid-template-columns: minmax(340px, 800px) minmax(240px, 320px);
    gap: 24px;
    justify-content: center;
    align-items: start;
}
@media (max-width: 760px) { .whl-spin-layout { grid-template-columns: 1fr; } }
.whl-wheelbox canvas { width: 100%; height: auto; display: block; }

.whl-controls { display: flex; gap: 10px; margin-top: 16px; justify-content: center; flex-wrap: wrap; }
.whl-btn-spin {
    background: var(--fc-accent, #9146ff);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 12px 26px;
    font: inherit;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
}
.whl-btn-spin:hover { background: var(--fc-accent-hover, #a970ff); }
.whl-btn-spin:disabled { opacity: .4; cursor: default; }
.whl-btn-secondary {
    background: var(--fc-panel, #18181b);
    color: inherit;
    border: 1px solid var(--fc-border, #2d2d33);
    border-radius: 8px;
    padding: 12px 18px;
    font: inherit;
    cursor: pointer;
}
.whl-btn-secondary.is-on { background: var(--fc-accent, #9146ff); border-color: var(--fc-accent, #9146ff); color: #fff; font-weight: 700; }
.whl-mode-select {
    background: var(--fc-panel, #18181b);
    border: 1px solid var(--fc-border, #2d2d33);
    border-radius: 8px;
    color: inherit;
    padding: 12px 10px;
    font: inherit;
    cursor: pointer;
}
.whl-mode-desc { text-align: center; margin-top: 10px; color: var(--fc-muted, #9d9da8); font-size: 13px; }
.whl-spin-status { text-align: center; margin-top: 12px; min-height: 24px; color: var(--fc-muted, #9d9da8); }

.whl-settings {
    background: var(--fc-panel, #18181b);
    border: 1px solid var(--fc-border, #2d2d33);
    border-radius: 12px;
    padding: 16px;
    margin-top: 16px;
}
.whl-settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; align-items: end; }
.whl-checkline { display: flex; gap: 8px; align-items: center; font-size: 14px; cursor: pointer; }

.whl-panel {
    background: var(--fc-panel, #18181b);
    border: 1px solid var(--fc-border, #2d2d33);
    border-radius: 12px;
    padding: 14px 16px;
}
.whl-panel + .whl-panel { margin-top: 16px; }
.whl-panel h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--fc-muted, #9d9da8); margin: 0 0 10px; }
.whl-prow { display: flex; align-items: center; gap: 8px; padding: 4px 0; }
.whl-prow.is-out { text-decoration: line-through; color: var(--fc-muted, #9d9da8); }
.whl-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.whl-pname { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.whl-pstat { color: var(--fc-muted, #9d9da8); font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.whl-mini {
    background: none;
    border: 1px solid var(--fc-border, #2d2d33);
    border-radius: 6px;
    color: var(--fc-muted, #9d9da8);
    font-size: 11px;
    padding: 2px 8px;
    margin-left: 8px;
    vertical-align: middle;
    cursor: pointer;
}
.whl-back-btn { display: block; margin-top: 16px; text-align: center; text-decoration: none; }
/* журнал вильотів не розтягує сторінку — скролиться всередині панелі */
.whl-out-list { max-height: 260px; overflow-y: auto; }

.whl-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .75);
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 12px;
    z-index: 40;
    text-align: center;
    padding: 20px;
}
.whl-overlay.is-shown { display: flex; }
.whl-overlay-trophy { font-size: 72px; }
.whl-overlay-winner { font-size: 42px; font-weight: 800; }
.whl-overlay-sub { color: var(--fc-muted, #9d9da8); }
.whl-overlay-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }

.whl-confetti {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 41;
    display: none;
}
.whl-confetti.is-shown { display: block; }

/* картки інтеграцій симетричні: підказка розтягується, кнопки притиснуті до низу */
.whl-key-hint { font-size: 12px; color: var(--fc-muted, #9d9da8); margin: 0 0 6px; flex-grow: 1; }
.whl-key-link {
    font-size: 12px;
    color: var(--fc-accent, #9146ff);
    text-decoration: none;
    margin-bottom: 12px;
    align-self: flex-start;
}
.whl-key-link:hover { text-decoration: underline; }
.whl-integration-buttons { display: flex; gap: 8px; }
.whl-integration-buttons .whl-btn { flex: 1; text-align: center; }

/* ===== OBS-оверлей колеса (преміум) ===== */
.ovl-stage, .ovl-stage *, .ovl-stage *::before, .ovl-stage *::after { box-sizing: border-box; }
/* висота сцени = рівно вьюпорт: інакше bottom-елементи (статус,
   нижня третина переможця) опиняються ЗА межами екрана */
.ovl-stage { height: 100vh; overflow: hidden; }
.ovl-stage { position: relative; min-height: 100vh; padding: 56px 24px 64px; display: flex; align-items: center; gap: 24px; }
.ovl-pos-center { justify-content: center; }
.ovl-pos-left { justify-content: flex-start; }
/* row-reverse обертає вісь: правий край = flex-START (не end!) —
   колесо праворуч, панелі ліворуч від нього */
.ovl-pos-right { justify-content: flex-start; flex-direction: row-reverse; }
.ovl-wheel { display: block; filter: drop-shadow(0 18px 44px rgba(0, 0, 0, .55)); }

.ovl-side { display: flex; flex-direction: column; gap: 12px; width: 218px; flex: none; }
.ovl-glass { background: rgba(10, 10, 12, .74); border: 1px solid rgba(255, 255, 255, .12); border-radius: 14px; padding: 12px 14px; backdrop-filter: blur(5px); }
.ovl-glass h4 { margin: 0 0 8px; font-size: 10.5px; letter-spacing: .22em; text-transform: uppercase; color: #9b9ba4; display: flex; justify-content: space-between; }
.ovl-glass.is-duel { border-color: rgba(255, 215, 94, .45); box-shadow: 0 0 24px rgba(255, 215, 94, .15); }
.ovl-prow { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; padding: 4px 2px; border-radius: 8px; transition: background .3s; }
.ovl-prow.is-hit { background: rgba(255, 215, 94, .18); }
.ovl-prow.is-final .ovl-pname { color: #ffd75e; }
.ovl-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.ovl-pname { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ovl-ptk { font-size: 11px; font-weight: 800; color: #0d0d10; background: #e8e8ee; border-radius: 999px; padding: 1px 8px; }
.ovl-orow { display: flex; gap: 8px; font-size: 12px; color: #8f8f96; padding: 3px 2px; }
.ovl-oname { text-decoration: line-through; text-decoration-color: rgba(255, 255, 255, .35); }
.ovl-orow.is-new { color: #ff9d9d; animation: ovl-rowin .5s ease; }
.ovl-orow.is-new .ovl-oname { text-decoration-color: rgba(255, 157, 157, .6); }
@keyframes ovl-rowin { from { transform: translateX(14px); opacity: 0; } }
.ovl-empty { font-size: 11.5px; color: #6d6d75; }
.ovl-duel { text-align: center; font-size: 11px; font-weight: 800; letter-spacing: .25em; color: #ffd75e; padding-top: 2px; }

.ovl-hud { position: absolute; top: 14px; display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700;
    background: rgba(10, 10, 12, .72); border: 1px solid rgba(255, 255, 255, .12); border-radius: 999px; padding: 6px 14px; backdrop-filter: blur(4px); }
.ovl-hud-left { left: 16px; }
.ovl-hud-right { right: 16px; color: #ffd75e; }
.ovl-hud-dot { width: 8px; height: 8px; border-radius: 50%; background: #38c172; }
.ovl-hud-dot.is-auto { background: #ffd75e; }
.ovl-presents { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); text-align: center; }
.ovl-presents-label { font-size: 9px; letter-spacing: .3em; text-transform: uppercase; color: #8f8f8f; }
.ovl-presents-brand { font-size: 15px; font-weight: 800; color: #ffd028; }

.ovl-status { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); white-space: nowrap;
    font-size: 19px; font-weight: 800; color: #fff; text-shadow: 0 2px 14px rgba(0, 0, 0, .8);
    background: rgba(10, 10, 12, .68); border: 1px solid rgba(255, 255, 255, .12); border-radius: 999px; padding: 8px 22px; backdrop-filter: blur(4px); opacity: 0; }
.ovl-status.is-pop { animation: ovl-statpop .55s cubic-bezier(.2, 1.6, .4, 1) forwards; }
.ovl-status.is-out { color: #ff8b8b; border-color: rgba(255, 139, 139, .4); }
@keyframes ovl-statpop { 0% { opacity: 0; transform: translateX(-50%) scale(.6); } 100% { opacity: 1; transform: translateX(-50%) scale(1); } }

.ovl-confetti { display: none; position: fixed; inset: 0; pointer-events: none; z-index: 6; }
.ovl-confetti.is-shown { display: block; }
.ovl-winner { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 26px; display: none; align-items: center; gap: 16px; z-index: 3;
    background: linear-gradient(0deg, rgba(6, 6, 8, .92), transparent); }
.ovl-winner.is-shown { display: flex; }
.ovl-winner.is-full { inset: 0; flex-direction: column; justify-content: center; text-align: center; background: rgba(6, 6, 8, .8); }
.ovl-winner-trophy { font-size: 34px; }
.ovl-winner.is-full .ovl-winner-trophy { font-size: 64px; }
.ovl-winner-label { color: #adaaaa; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; }
.ovl-winner-name { color: #fff; font-size: 32px; font-weight: 800; line-height: 1; }
.ovl-winner.is-full .ovl-winner-name { font-size: 56px; }

/* ===== пульт (Custom Browser Dock) ===== */
/* standalone-сторінка без глобального резету: без border-box інпути
   на width:100% вилазять падінгами в сусідню колонку сітки */
.whc-page *, .whc-page *::before, .whc-page *::after { box-sizing: border-box; }
.whc-page { min-height: 100vh; background: #131316; color: #f5f6f6; font-family: "Manrope", "Segoe UI", sans-serif; padding: 14px; }
.whc-title { font-size: 14px; font-weight: 800; margin: 0 0 10px; display: flex; align-items: center; gap: 8px; }
.whc-conn { width: 8px; height: 8px; border-radius: 50%; background: #6d6d75; }
.whc-conn.is-live { background: #38c172; }
.whc-row { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; align-items: center; }
.whc-lbl { font-size: 10.5px; color: #7c7c84; letter-spacing: .06em; text-transform: uppercase; width: 100%; margin: 2px 0; }
.whc-btn { border-radius: 999px; padding: 9px 18px; font-size: 13px; font-weight: 700; border: 1px solid rgba(72, 72, 71, .4); background: #222; color: #f5f6f6; cursor: pointer; font-family: inherit; }
.whc-btn.is-primary { background: #00fd84; color: #062c14; border-color: transparent; }
.whc-btn.is-on { border-color: rgba(0, 253, 132, .6); color: #a5ffb8; }
.whc-btn.is-ghost { background: transparent; color: #8f8f8f; }
.whc-status { font-size: 12.5px; color: #adadb6; min-height: 20px; margin-bottom: 10px; }
.whc-settings { border-top: 1px solid rgba(72, 72, 71, .4); padding-top: 10px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.whc-field label { display: block; font-size: 10.5px; color: #7c7c84; margin-bottom: 3px; }
.whc-field input[type="number"], .whc-field input[type="text"] { width: 100%; padding: 6px 9px; border-radius: 8px; border: 1px solid rgba(72, 72, 71, .6); background: #101013; color: #f5f6f6; font-family: inherit; font-size: 13px; }
.whc-field input[type="range"] { width: 100%; }
.whc-check { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #adadb6; }
.whc-help { border-top: 1px solid rgba(72, 72, 71, .4); margin-top: 12px; padding-top: 10px; font-size: 11.5px; color: #8f8f96; line-height: 1.5; }
.whc-help code { background: #1d1d22; border-radius: 5px; padding: 1px 5px; font-size: 10.5px; }

/* пульт: бренд і картки */
.whc-brand { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #9b9ba4; padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px solid rgba(72, 72, 71, .4); }
.whc-logo { font-weight: 800; letter-spacing: .02em; color: #f5f6f6; }
.whc-logo b { color: #ffd028; }
.whc-brand-sep { color: #55555c; }
.whc-brand-link { margin-left: auto; color: #8f8f96; text-decoration: none; font-size: 11.5px; }
.whc-brand-link:hover { color: #f5f6f6; }
.whc-card { background: #1a1a1e; border: 1px solid rgba(72, 72, 71, .4); border-radius: 12px; padding: 12px; margin-bottom: 10px; }
.whc-status-inline { font-weight: 600; color: #adadb6; font-size: 12.5px; }
.whc-settings { border-top: none; padding-top: 0; }
/* сайтове лого, пропорційно зменшене (оригінал: 39px шрифт / 28px картинка / -3px -11px) */
.whc-brand .fc-brand { font-size: 26px; }
.whc-brand .fc-brand-image { max-height: 19px; margin: -2px -7px; }

/* прев'ю поза OBS: шахова підкладка = «тут буде прозоро» */
.ovl-stage.is-preview {
    background:
        linear-gradient(45deg, #1a1a1d 25%, transparent 25%, transparent 75%, #1a1a1d 75%),
        linear-gradient(45deg, #1a1a1d 25%, #141416 25%, #141416 75%, #1a1a1d 75%);
    background-size: 28px 28px;
    background-position: 0 0, 14px 14px;
    background-color: #101012;
}
.ovl-preview-hint { display: none; }
.ovl-stage.is-preview .ovl-preview-hint {
    display: block; position: fixed; left: 16px; bottom: 14px; max-width: 46ch; z-index: 5;
    font-size: 11.5px; color: #8f8f96; background: rgba(10, 10, 12, .72);
    border: 1px solid rgba(255, 255, 255, .1); border-radius: 10px; padding: 7px 12px;
    /* прочитав — зникла: не конфліктує з нижньою третиною переможця */
    animation: ovl-hint-fade 1s ease 9s forwards;
}
@keyframes ovl-hint-fade { to { opacity: 0; visibility: hidden; } }

/* світла тема оверлея: для світлих сцен/фонів стрімера */
.ovl-stage.is-light .ovl-glass { background: rgba(255, 255, 255, .82); border-color: rgba(0, 0, 0, .12); color: #17181a; }
.ovl-stage.is-light .ovl-glass h4 { color: #5d5f63; }
.ovl-stage.is-light .ovl-glass h4 .cnt { color: #17181a; }
.ovl-stage.is-light .ovl-ptk { background: #17181a; color: #f2f2f6; }
.ovl-stage.is-light .ovl-prow.is-hit { background: rgba(212, 160, 23, .22); }
.ovl-stage.is-light .ovl-prow.is-final .ovl-pname { color: #a87b00; }
.ovl-stage.is-light .ovl-orow { color: #6d6f75; }
.ovl-stage.is-light .ovl-orow.is-new { color: #c0392b; }
.ovl-stage.is-light .ovl-empty { color: #8d8f95; }
.ovl-stage.is-light .ovl-duel { color: #a87b00; }
.ovl-stage.is-light .ovl-glass.is-duel { border-color: rgba(212, 160, 23, .5); box-shadow: 0 0 24px rgba(212, 160, 23, .18); }
.ovl-stage.is-light .ovl-hud { background: rgba(255, 255, 255, .82); border-color: rgba(0, 0, 0, .12); color: #17181a; }
.ovl-stage.is-light .ovl-hud-right { color: #a87b00; }
.ovl-stage.is-light .ovl-presents-label { color: #6d6f75; }
.ovl-stage.is-light .ovl-presents-brand { color: #b8860b; }
.ovl-stage.is-light .ovl-status { background: rgba(255, 255, 255, .86); border-color: rgba(0, 0, 0, .12); color: #17181a; text-shadow: none; }
.ovl-stage.is-light .ovl-status.is-out { color: #c0392b; border-color: rgba(192, 57, 43, .35); }
.ovl-stage.is-light .ovl-winner { background: linear-gradient(0deg, rgba(255, 255, 255, .94), transparent); }
.ovl-stage.is-light .ovl-winner.is-full { background: rgba(255, 255, 255, .88); }
.ovl-stage.is-light .ovl-winner-label { color: #6d6f75; }
.ovl-stage.is-light .ovl-winner-name { color: #17181a; }
