/*** Shared styling across all quizzes ***/
html.lock-scroll, body.lock-scroll { overflow: hidden !important; height: 100%; }

.quiz-wrapper { position: relative; background: #fff; text-align: center; z-index: 5; }
.quiz-wrapper.overlay { position: fixed !important; inset: 0; width: 100vw; height: 100dvh; background: #fff; z-index: 2147483647; display: flex; flex-direction: column; box-sizing: border-box; padding: 20px; overflow: hidden; }
.quiz-wrapper.overlay .quiz-top-section { padding: 0px 0px 20px; }
.quiz-wrapper.overlay .team-list { flex: 1; overflow-y: auto; -webkit-overflows-scrolling: touch; max-height: calc(100dvh - 200px); }
.quiz-wrapper.overlay .logo-grid { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; max-height: calc(100dvh - 200px); }
.quiz-wrapper.overlay .stadium-list { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; max-height: calc(100dvh - 200px); }
.quiz-wrapper.overlay .sb-list { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; max-height: calc(100dvh - 200px); }
.quiz-wrapper.overlay .quiz-topbar h1 { display: block; margin: 0px 0px 20px; }
.quiz-close-overlay { position: absolute; top: 5px; right: 5px; font-size: 1.5em; background: none; border: none; color: #fff; cursor: pointer; line-height: 1; }
.quiz-close-overlay:hover { color: #dadada; }
.quiz-expand-overlay { display: none; position: absolute; right: 0; top: 50%; transform: translateY(-50%); background: none; border: none; color: #5e933f; font-size: 1.2em; cursor: pointer; }
@media (max-width: 767px) { .quiz-wrapper:not(.overlay) .quiz-expand-overlay { display: inline; } .quiz-wrapper.overlay .quiz-expand-overlay { display: none; } }

.quiz-btn-start, .quiz-btn-giveup, .quiz-btn-restart { width: 100%; cursor: pointer; border: 1px solid #000; }
.quiz-btn-secondary { width: 100%; cursor: pointer; margin-top: 10px; border: 1px solid #000; background-color: #aaa !important; }
.quiz-faq-link { margin-top: 10px; display: block; -webkit-tap-highlight-color: transparent; }
.quiz-faq-link:focus { outline: none; }
.quiz-btn-giveup { line-height: 1; }

.quiz-top-section { background: white; padding: 20px 0px; }
@media (min-width: 768px) { .quiz-top-section { position: sticky; top: 96px; z-index: 999; } }
.quiz-topbar { display: flex; align-items: center; justify-content: center; position: relative; }
.quiz-topbar h1 { display: none; }

.quiz-timer { font-size: 1.8em; line-height: 1; color: #5e933f; text-align: center; white-space: nowrap; }
.quiz-table { width: 100%; border-collapse: collapse; }
.quiz-table td { padding: 5px; vertical-align: middle; text-align: center; white-space: nowrap; position: relative; }
.quiz-input { text-align: left !important; border: 1px solid #000 !important; padding: 5px 30px 5px 10px !important; }
.quiz-progress { display: flex; align-items: center; width: 100%; gap: 0; margin: 0; }
.quiz-progress-label { background: #3f3f3f; color: #fff; padding: 3px 10px; border-radius: 4px 0 0 4px; height: 32px; min-width: 65px; text-align: center; }
.quiz-progress-bar { flex: 1; height: 32px; background: #dadada; border: 1px solid #3f3f3f; border-radius: 0 4px 4px 0; overflow: hidden; }
.quiz-progress-fill { height: 100%; width: 0%; background: #dff0d8; transition: width 0.3s ease-in-out; }

.quiz-results { margin: 20px 0px; }
.quiz-filled { background: #dff0d8 !important; color: #5e933f; }
.quiz-missed { background: #f2dede !important; color: #a94442; }
.quiz-active { outline: 2px solid #5e933f; outline-offset: -2px; }


/*** Styling for the NFL Team Quiz ***/
.team-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; justify-items: center; }
@media (max-width: 767px) { .team-list { grid-template-columns: repeat(2, 1fr); } }
table.team-division { width: 100%; border: 1px solid black; border-collapse: collapse; margin: 0 auto 10px auto; }
table.team-division th { background: #3f3f3f; color: #fff; text-align: center; height: 35px; border: 1px solid black; border-collapse: collapse; padding: 5px; }
table.team-division td { background: #fff; text-align: center; height: 35px; border: 1px solid black; border-collapse: collapse; padding: 5px; }


/*** Styling for the NFL Logo Quiz ***/
.logo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 10px; justify-items: center; }
.logo-box { width: 90px; min-height: 90px; border: 1px solid #ddd; border-radius: 8px; background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 6px; cursor: pointer; box-sizing: border-box; }
.logo-img { width: 40px; height: 40px; object-fit: contain; }
.logo-name { margin-top: 6px; font-size: 12px; min-height: 14px; line-height: 1.2; opacity: 0.4; }


/*** Styling for the NFL Stadium Quiz ***/
table.stadium-table { width: 100%; border: 1px solid black; border-collapse: collapse; }
table.stadium-table th { background: #3f3f3f; color: #fff; text-align: left; border: 1px solid black; border-collapse: collapse; padding: 10px 20px 10px 10px; }
table.stadium-table td { text-align: left; border: 1px solid black; border-collapse: collapse; padding: 10px 20px 10px 10px; }
table.stadium-table td.stadium-name { width: auto; white-space: nowrap; background-color: #DADADA; pointer-events: none; user-select: none; }
table.stadium-table td.stadium-team { width: 100%; cursor: pointer; }


/*** Styling for the NFL Super Bowl Winners Quiz ***/
table.sb-table { width: 100%; border: 1px solid black; border-collapse: collapse; }
table.sb-table th { background: #3f3f3f; color: #fff; text-align: left; border: 1px solid black; border-collapse: collapse; padding: 10px; }
table.sb-table td { text-align: left; border: 1px solid black; border-collapse: collapse; padding: 10px; }
table.sb-table td.sb-game { width: auto; white-space: nowrap; background-color: #DADADA; pointer-events: none; user-select: none; }
table.sb-table td.sb-opponent { width: auto; white-space: nowrap; background-color: #DADADA; pointer-events: none; user-select: none; }
table.sb-table td.sb-winner { width: 100%; cursor: pointer; }