/* Guide video player (Views/Shared/_GuideVideoPlayer.cshtml) on its own page (/GuideVideo, over the sign-in page's
   dark background) and in the modal (_GuideVideoModal: sign-in page and the app's Guide Video menu). Self-contained:
   the app pages use Bootstrap, the sign-in pages the landing styles, so every color and font is set here.
   Desktop and tablet: the landscape video with the chapter list beside it. Phones: the portrait video, chapters below. */
.gv-root {
   --gv-ink: #211d1a; --gv-wine: #8f1325; --gv-gold: #c88a2c; --gv-text: #f4efe6; --gv-soft: #e3dbcf; --gv-muted: #b8aea2;
   display: grid; gap: 24px; color: var(--gv-text); font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif; line-height: 1.5; text-align: left;
}
.gv-root *, .gv-root *::before, .gv-root *::after { box-sizing: border-box; }

.gv-root .gv-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px 32px; }
.gv-root .gv-kicker { margin: 0 0 10px; color: var(--gv-gold); font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.gv-root .gv-title { margin: 0; color: #fff; font: 500 clamp(30px, 4vw, 50px)/1 Georgia, "Times New Roman", serif; letter-spacing: -.03em; text-wrap: balance; }
.gv-root .gv-lede { max-width: 620px; margin: 12px 0 0; color: var(--gv-soft); font-size: 16px; }

.gv-root .gv-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.gv-root .gv-tabs[hidden] { display: none; }
.gv-root .gv-tabs a { min-height: 40px; display: inline-flex; align-items: center; padding: 0 18px; border: 1px solid #ffffff4d; border-radius: 999px; color: #fff; font-size: 13px; font-weight: 700; text-decoration: none; }
.gv-root .gv-tabs a:hover { border-color: #fff; color: #fff; }
.gv-root .gv-tabs a[aria-current="page"] { border-color: var(--gv-gold); background: var(--gv-gold); color: var(--gv-ink); }

/* Guide buttons, then the language switch (only for a guide narrated in several languages). */
.gv-root .gv-switches { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px 16px; }
.gv-root .gv-langs { display: flex; gap: 0; border: 1px solid #ffffff4d; border-radius: 999px; overflow: hidden; }
.gv-root .gv-langs[hidden] { display: none; }
.gv-root .gv-langs button { min-height: 36px; margin: 0; padding: 0 14px; border: 0; background: transparent; color: #fff; cursor: pointer; font: 600 13px/1 Inter, system-ui, sans-serif; }
.gv-root .gv-langs button + button { border-left: 1px solid #ffffff33; }
.gv-root .gv-langs button:hover { background: #ffffff1a; }
.gv-root .gv-langs button[aria-pressed="true"] { background: #fff; color: var(--gv-ink); }
.gv-root .gv-lang-short { display: none; }

.gv-root .gv-player { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.gv-root .gv-stage { min-width: 0; }
.gv-root .gv-video { width: 100%; height: auto; display: block; aspect-ratio: 16 / 9; background: #000; box-shadow: 0 24px 60px rgba(0, 0, 0, .35); }
.gv-root .gv-missing { margin: 0; padding: 40px 24px; border: 1px dashed #ffffff55; text-align: center; color: var(--gv-soft); }

/* One segment per chapter, as wide as the chapter is long; the gold fill is how much of it has played. */
.gv-root .gv-bar { display: flex; gap: 3px; margin-top: 10px; }
.gv-root .gv-part { position: relative; flex: 1 1 0; min-width: 6px; height: 14px; margin: 0; padding: 0; border: 0; background: transparent; cursor: pointer; }
.gv-root .gv-part::before { position: absolute; inset: 4px 0; background: #ffffff40; content: ""; }
.gv-root .gv-part i { position: absolute; top: 4px; bottom: 4px; left: 0; width: 0; background: var(--gv-gold); }
.gv-root .gv-part:hover::before, .gv-root .gv-part:focus-visible::before { inset: 2px 0; background: #ffffff66; }
.gv-root .gv-part:hover i, .gv-root .gv-part:focus-visible i { top: 2px; bottom: 2px; }

.gv-root .gv-chapters { border-top: 4px solid var(--gv-wine); background: #211d1ad9; padding: 16px 0 8px; }
.gv-root .gv-chapters h3 { margin: 0 18px 8px; color: var(--gv-gold); font: 800 11px/1.2 Inter, system-ui, sans-serif; letter-spacing: .12em; text-transform: uppercase; }
.gv-root .gv-chapters ol { margin: 0; padding: 0; list-style: none; }
.gv-root .gv-chapters button { width: 100%; display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: baseline; gap: 10px; margin: 0; padding: 11px 18px; border: 0; border-left: 3px solid transparent; border-radius: 0; background: transparent; color: var(--gv-text); text-align: left; cursor: pointer; font: 400 14px/1.4 Inter, system-ui, sans-serif; }
.gv-root .gv-chapters button:hover, .gv-root .gv-chapters button:focus-visible { background: #ffffff14; }
.gv-root .gv-num, .gv-root .gv-time { color: var(--gv-muted); font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums; }
.gv-root .gv-time { font-weight: 400; }
.gv-root .is-current button { border-left-color: var(--gv-gold); background: #ffffff1f; font-weight: 700; }
.gv-root .is-current .gv-num { color: var(--gv-gold); }

/* The phone cut is portrait: keep it within the screen height and centre it. */
.gv-root.gv-phone .gv-player { grid-template-columns: minmax(0, 1fr); }
.gv-root.gv-phone .gv-stage { width: min(100%, calc(74vh * 9 / 16)); margin-inline: auto; }
.gv-root.gv-phone .gv-video { aspect-ratio: 9 / 16; }

@media (max-width: 900px) {
   .gv-root .gv-player { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
   .gv-root { gap: 16px; }
   .gv-root .gv-title { font-size: 28px; }
   .gv-root .gv-lede { font-size: 15px; }
   .gv-root .gv-tabs a { min-height: 36px; padding: 0 14px; }
}

/* Own page: under the sign-in page's header, on its background. */
.gv-page main { align-items: start; padding: 48px 0 64px; }
@media (max-width: 560px) { .gv-page main { padding: 20px 0 32px; } }

/* Modal: the same dark photo background as the sign-in page, a Close button at the top right. */
.gv-dialog { width: min(1240px, calc(100% - 32px)); max-width: none; max-height: calc(100% - 32px); margin: auto; padding: 0; overflow: auto; border: 0; background: #211d1a url("/images/rightanswer-bg.jpg") center / cover; color: #f4efe6; box-shadow: 0 30px 80px rgba(0, 0, 0, .5); }
.gv-dialog::backdrop { background: rgba(15, 12, 10, .72); }
.gv-dialog .gv-root { position: relative; padding: 36px 40px 40px; background: linear-gradient(100deg, rgba(33, 29, 26, .95) 0%, rgba(33, 29, 26, .86) 50%, rgba(111, 15, 29, .7) 100%); }
.gv-dialog .gv-close { position: sticky; z-index: 2; top: 12px; float: right; margin: 12px 12px -56px 0; min-height: 40px; display: inline-flex; align-items: center; gap: 6px; padding: 0 16px; border: 1px solid #ffffff66; border-radius: 999px; background: rgba(33, 29, 26, .8); color: #fff; cursor: pointer; font: 700 13px/1 Inter, system-ui, sans-serif; }
.gv-dialog .gv-close span { font-size: 20px; line-height: 1; }
.gv-dialog .gv-close-label { font-weight: 700; }
.gv-dialog .gv-close:hover { border-color: #fff; }
.gv-dialog .gv-head { padding-right: 110px; }
html.gv-open { overflow: hidden; }
/* Phone: the modal fills the screen and its heading shrinks to two compact rows, the title beside Close and the guide
   buttons with the language switch (under Close), so the portrait video gets the rest of the height; the chapters follow below. */
@media (max-width: 560px) {
   .gv-dialog { width: 100%; max-height: 100%; height: 100%; }
   .gv-dialog .gv-root { min-height: 100%; gap: 8px; padding: 8px 10px 24px; }
   .gv-dialog .gv-close { top: 6px; width: 32px; min-height: 32px; justify-content: center; margin: 6px 10px -38px 0; padding: 0; }
   .gv-dialog .gv-close span { font-size: 20px; }
   .gv-dialog .gv-close-label { display: none; }
   /* Title, then the guide buttons on their own row, whatever the title's length: switching guides never moves the video. */
   .gv-dialog .gv-head { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; padding-right: 0; }
   .gv-dialog .gv-head > div:first-child { padding-right: 44px; }
   .gv-dialog .gv-kicker, .gv-dialog .gv-lede { display: none; }
   .gv-dialog .gv-title { font-size: 20px; line-height: 32px; }
   .gv-dialog .gv-tabs { gap: 5px; }
   .gv-dialog .gv-tabs a { min-height: 28px; padding: 0 9px; font-size: 12px; }
   /* The language switch sits at the right end of the guide buttons' row (under Close), and wraps there on narrow phones. */
   .gv-dialog .gv-switches { flex-wrap: wrap; justify-content: space-between; gap: 6px; }
   .gv-dialog .gv-langs { margin-left: auto; }
   .gv-dialog .gv-langs button { min-height: 28px; padding: 0 6px; font-size: 11px; }
   .gv-dialog .gv-lang-name { display: none; }
   .gv-dialog .gv-lang-short { display: inline; }
   .gv-dialog .gv-player { gap: 14px; }
   .gv-dialog .gv-root.gv-phone .gv-stage { width: min(100%, calc((100vh - 104px) * 9 / 16)); width: min(100%, calc((100dvh - 104px) * 9 / 16)); }
   .gv-dialog .gv-bar { margin-top: 6px; }
}
/* The narrowest phones put the language switch on a row of its own; the video gives up that row's height. */
@media (max-width: 340px) {
   .gv-dialog .gv-root.gv-phone:has(.gv-langs:not([hidden])) .gv-stage { width: min(100%, calc((100vh - 138px) * 9 / 16)); width: min(100%, calc((100dvh - 138px) * 9 / 16)); }
}

/* Guide menu (_Layout): the login's own guide, then its chapters indented under it, closer together and
   without the separator lines, in a wider dropdown so a chapter title fits on one line. */
.rd-navbar-static .rd-navbar-dropdown.gv-menu { width: 330px; }
.rd-navbar .gv-menu .gv-menu-guide > a { font-weight: 700; }
.rd-navbar.rd-navbar-static .rd-navbar-dropdown.gv-menu li.gv-menu-chapter { margin-top: 12px; }
.rd-navbar.rd-navbar-static .rd-navbar-dropdown.gv-menu li.gv-menu-chapter::before,
.rd-navbar.rd-navbar-static .rd-navbar-dropdown.gv-menu li.gv-menu-chapter::after { display: none; }
.rd-navbar .gv-menu .gv-menu-chapter > a { padding-left: 1.4em; font-size: 13px; }
/* Phone drawer (rd-navbar-fixed, RightAnswerVX.1.4.0.css sets its links with !important): the chapters hang under
   their guide behind a thin line, smaller, closer together and without the chevron. */
.rd-navbar-fixed .rd-navbar-nav .rd-navbar-dropdown.gv-menu > li.gv-menu-guide > a { font-weight: 600 !important; }
.rd-navbar-fixed .rd-navbar-nav .rd-navbar-dropdown.gv-menu > li.gv-menu-chapter { margin: 0 0 0 26px !important; border-left: 1px solid rgba(255, 255, 255, .35); }
.rd-navbar-fixed .rd-navbar-nav .rd-navbar-dropdown.gv-menu > li.gv-menu-chapter > a { padding: 7px 0 7px 14px !important; color: rgba(255, 255, 255, .78) !important; font-size: 13.5px !important; }
.rd-navbar-fixed .rd-navbar-nav .rd-navbar-dropdown.gv-menu > li.gv-menu-chapter > a:before { display: none !important; }
.gv-dialog .gv-close:focus { outline: none; }
.gv-dialog .gv-close:focus-visible { outline: 2px solid #c88a2c; outline-offset: 2px; }
