/* ========== SHARED RANDOMIZER STYLES ========== */

/*** Layout / Shell ***/
.randomizer-wrapper { margin: 0 auto; padding: 0px; }
.randomizer-layout { display: grid; grid-template-columns: 1fr 322px; gap: 20px; align-items: stretch; }
@media (max-width: 767px) { .randomizer-layout { grid-template-columns: 1fr; } }

/*** Stage + History Containers ***/
.randomizer-stage, .randomizer-history-box { height: 350px; background: #fff; border: 1px solid #dadada; display: flex; flex-direction: column; }
.randomizer-stage { padding: 0px; }

/*** Shared Header Bar (Stage + History) ***/
.randomizer-header { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px; color: #fff; background: #3f3f3f; }
.randomizer-header h3 { margin: 0; font-size: 1.2em; color: inherit; }
.randomizer-header-icons { display: flex; gap: 12px; align-items: center; }
.randomizer-header-icons i { margin-right: 5px; cursor: pointer; color: inherit; }
.randomizer-header-icons i:hover { opacity: 0.5; }
.randomizer-header-icons a { color: #fff; text-decoration: none; outline: 0; height: 14px; }
.randomizer-header-icons a > i { vertical-align: top; }

/*** Randomizer Stage (Logo Card + CTA) ***/
.randomizer-window { height: 260px; display: grid; place-items: center; position: relative; overflow: hidden; padding: 20px; }
.randomizer-logo-card { width: min(360px, calc(100% - 40px)); height: 210px; border: 1px solid #dadada; border-radius: 16px; display: grid; grid-template-rows: 1fr auto; place-items: center; padding: 20px; transition: background-color .2s ease, border-color .2s ease; }
.randomizer-logo-card img { width: 125px; height: 125px; object-fit: contain; display: none; }
.randomizer-logo-card:not(.is-selected) { background: #eaeaea; }
.randomizer-logo-card.is-selected { border-color: rgba(255,255,255,.22); }
.randomizer-logo-card.is-selected .randomizer-selected-name { display: block; }
.randomizer-selected-name { width: 100%; text-align: center; color: #fff; font-size: 1.5em; font-weight: bold; }
.randomizer-cta-container { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; align-items: center; margin: 15px 20px; }
.randomizer-cta-container .randomizer-btn { width: 100%; padding: 10px; }

/*** Primary CTA when 0 teams are selected ***/
.randomizer-btn.is-select-mode { background-color: #aaa !important; border-color: #aaa !important; color: #fff !important; cursor: pointer; }
.randomizer-btn.is-select-mode:hover { opacity: 0.85; }

/*** History List ***/
.randomizer-history { list-style: none; padding: 0px; margin: 10px; text-align: left; overflow-y: auto; flex: 1; }
.randomizer-history li { padding: 4px 0px; color: #fff; }
.randomizer-history li:first-child { padding-top: 0px; }
.randomizer-history li:last-child { padding-bottom: 0px; }
.randomizer-history li.randomizer-history-empty { padding: 16px 8px; border-radius: 8px; background: #EAEAEA; text-align: center; color: #6B6B6B; font-size: 14px; line-height: 1.4; }
.randomizer-history-row { display: grid; grid-template-columns: 36px 1fr auto; grid-template-rows: auto auto; gap: 2px 16px; align-items: center; padding: 8px 16px; border-radius: 8px; }
.randomizer-history-logo { grid-row: 1 / span 2; grid-column: 1; width: 36px; height: 36px; object-fit: contain; filter: drop-shadow(0 1px 1px rgba(0,0,0,.25)); }
.randomizer-history-name { grid-row: 1; grid-column: 2; font-weight: bold; font-size: 1.1em; line-height: 1.15; }
.randomizer-history-time { grid-row: 2; grid-column: 2; font-size: 11px; opacity: 0.8; }
.randomizer-history-odds { grid-row: 1 / span 2; grid-column: 3; text-align: center; font-size: 11px; line-height: 1.25; }

/*** Settings Modal (Toolbar + Segmented Control + List) ***/
.gg-seg-row .btn-group { margin: 0px; text-align: center; width: 100%; }
.gg-seg-row .btn-group > .gg-seg-btn { border: 1px solid black; background: #fff; color: #6B6B6B; padding: 8px 12px; cursor: pointer; font-weight: 700; line-height: 1; width: 33.33%; }
.gg-seg-row .btn-group > .gg-seg-btn:hover { background: #5e933f; color: #fff; opacity: 0.5; }
.gg-seg-row .btn-group > .gg-seg-btn:focus, .gg-seg-row .btn-group > .gg-seg-btn:active { outline: none !important; box-shadow: none !important; }
.gg-seg-row .btn-group > .gg-seg-btn.is-active { background: #5e933f; color: #fff; }
.gg-count-row { display: flex; justify-content: space-between; align-items: center; margin: 10px 10px 20px; font-size: .9em; }
#randomizer-teams-wrapper { height: 290px; overflow-y: auto; padding: 0px; border: 1px solid #DADADA; border-radius: 8px; }
.randomizer-custom-item { display: flex; align-items: center; gap: 16px; padding: 8px 16px; margin: 0px; border-bottom: 1px solid #DADADA; }
.randomizer-custom-item:last-child { border-bottom: none; }
.randomizer-custom-item img { width: 22px; height: 22px; object-fit: contain; flex: 0 0 22px; }
.randomizer-custom-team-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 700; flex: 1; min-width: 0; }
.randomizer-custom-division { text-align: center; font-size: 12px; line-height: 1.15; flex: 0 0 auto; opacity: 0.85; }


/* ========== NFL TEAM WHEEL SPECIFIC STYLES ========== */

/*** Fullscreen Mode ***/
.randomizer-wrapper.is-fullscreen { width: 100vw; height: 100vh; padding: 20px; background: #fff; display: flex; flex-direction: column; }
.randomizer-wrapper.is-fullscreen .randomizer-layout.wheel-layout { height: 100%; }
.randomizer-wrapper.is-fullscreen .wheel-container { width: clamp(600px, 65vmin, 700px); max-width: 700px; }
.randomizer-wrapper.is-fullscreen .ad.fullscreen-banner { display: block; width: 100%; height: 90px; margin: 20px 0px 0px; text-align: center; }

/*** Wheel Layout Override ***/
.randomizer-layout.wheel-layout { grid-template-columns: 1fr 322px; gap: 20px; align-items: stretch; }
@media (max-width: 900px) { .randomizer-layout.wheel-layout { grid-template-columns: 1fr; } }

/*** Wheel Stage Container ***/
.randomizer-stage.wheel-stage { height: 100%; }
.randomizer-window.wheel-window { height: 100%; padding: 20px; position: relative; }

/*** Wheel Canvas Container ***/
.wheel-container { position: relative; display: flex; justify-content: center; align-items: center; width: 100%; max-width: 600px; margin: 0 auto; }
.wheel-canvas-wrap { position: relative; width: 100%; padding-bottom: 100%; }
#wheel-canvas { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border-radius: 50%; }

/*** Wheel Center Hub (Spin Button) ***/
.wheel-hub { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 80px; height: 80px; border-radius: 50%; background: #5e933f; border: 4px solid #fff; box-shadow: 0 4px 12px rgba(0,0,0,0.3); display: flex; justify-content: center; align-items: center; z-index: 5; cursor: pointer; transition: transform 0.15s ease, box-shadow 0.15s ease; }
.wheel-hub:hover { transform: translate(-50%, -50%) scale(1.05); box-shadow: 0 6px 16px rgba(0,0,0,0.35); }
.wheel-hub:active { transform: translate(-50%, -50%) scale(0.98); }

/*** Hub Pointer Triangle (sticks out from top of circle, white border on sides only) ***/
.wheel-hub-pointer { position: absolute; top: -20px; left: 50%; transform: translateX(-50%); }
.wheel-hub-pointer::before { content: ''; position: absolute; top: 0; left: -14px; width: 0; height: 0; border-left: 14px solid transparent; border-right: 14px solid transparent; border-bottom: 20px solid #fff; }
.wheel-hub-pointer::after { content: ''; position: absolute; top: 4px; left: -10px; width: 0; height: 0; border-left: 10px solid transparent; border-right: 10px solid transparent; border-bottom: 18px solid #5e933f; }

/*** Hub Spin Text ***/
.wheel-hub-text { color: #fff; font-size: 18px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }

/*** Winner Display Card ***/
.wheel-winner-card { display: none; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); background: #fff; border-radius: 16px; border: 1px solid black; padding: 20px; box-shadow: 0 8px 32px rgba(0,0,0,0.25); text-align: center; z-index: 20; width: 300px; }
.wheel-winner-card.is-visible { display: block; animation: winnerPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes winnerPop { 0% { transform: translate(-50%, -50%) scale(0.5); opacity: 0; } 100% { transform: translate(-50%, -50%) scale(1); opacity: 1; } }
.wheel-winner-logo { width: 80px; height: 80px; object-fit: contain; }
.wheel-winner-name { font-size: 1.4em; font-weight: bold; color: #1f1f1f; margin: 0px 0px 20px; }
.wheel-winner-close, .wheel-winner-remove { background: #5e933f; color: #fff; border: 1px solid black; padding: 8px 20px; border-radius: 6px; cursor: pointer; font-weight: 600; min-width: 120px; }
.wheel-winner-close:hover, .wheel-winner-remove:hover { opacity: 0.85; }

/*** Wheel Empty State ***/
.wheel-empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 300px; color: #6b6b6b; font-size: 1.1em; }
.wheel-empty-state a { color: #6b6b6b; }
.wheel-empty-state i { font-size: 48px; margin: 0px 0px 16px; }
.wheel-empty-state i:hover { opacity: 0.5; }

/* Wheel slice display toggle (button-style radios) */
.wheel-display-toggle { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0px 20px 20px; }
.wheel-display-toggle .wheel-choice-input { opacity: 0; position: absolute; z-index: -1; }
.wheel-display-toggle .wheel-choice-input + label { border: 1px solid #000; border-radius: 8px; color: #000; padding: 8px; margin: 0; width: 100%; text-align: center; cursor: pointer; font-weight: 700; user-select: none; background: #fff; }
.wheel-display-toggle .wheel-choice-input:checked + label { background: #5e933f; color: #fff; }
@media (max-width: 420px) { .wheel-display-toggle { grid-template-columns: 1fr; } }

/*** Wheel History Container ***/
.randomizer-history-box.wheel-history { height: 100%; }


/* ========== NFL POSITION WHEEL SPECIFIC STYLES ========== */

/*** Position History Row (no logo) ***/
.position-history-row { display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; gap: 2px 16px; align-items: center; padding: 8px 16px; border-radius: 8px; color: #5e933f; background-color: #dff0d8; border-color: #d6e9c6; }
.position-history-row .randomizer-history-name { grid-row: 1; grid-column: 1; font-weight: bold; font-size: 1.1em; line-height: 1.15; }
.position-history-row .randomizer-history-time { grid-row: 2; grid-column: 1; font-size: 11px; opacity: 0.8; }
.position-history-row .randomizer-history-odds { grid-row: 1 / span 2; grid-column: 2; text-align: center; font-size: 11px; line-height: 1.25; }

/*** Position Settings - 4 buttons instead of 3 ***/
body.postid-110035 .gg-seg-row .btn-group > .gg-seg-btn { width: 25%; }

/*** Position List Wrapper ***/
#randomizer-positions-wrapper { height: 290px; overflow-y: auto; padding: 0px; border: 1px solid #DADADA; border-radius: 8px; }

/*** Winner card adjustments for no logo ***/
.randomizer-wrapper[data-type="random-nfl-position-wheel"] .wheel-winner-name { font-size: 1.6em; margin: 20px 0px; }
.randomizer-wrapper[data-type="random-nfl-position-wheel"] .wheel-winner-card button { padding: 8px; }