/* ==========================================================
   Comedy Online Course (Indiana) - course stylesheet
   File: cocin-course-v1.css
   BUILD 2026-11-23-B
   Install: last line inside <head>, after app.css and chapters.css.
   Build A covers the chapter page: the timer, the Continue button,
   the "stay on this page" note and phone fit. Registration pages come next.
   Build B: school header and timer stick to the top together (timer right
   under the header), polished timer, security question pages restyled.
   Never touches the course script: the countdown still runs in #gofwd,
   and the button is still enabled only by the script.
   ========================================================== */

:root{
  --navy:#14213D;
  --red:#B22234;
  --red-dk:#8E1B29;
  --note:#FFF4C2;
  --note-line:#E8B500;
  --done:#0E6B3C;
  --bar:52px;
}

/* ---------- 1. Timer bar: pinned to the top while the countdown runs ---------- */
/* The countdown lives inside the disabled Continue button (#gofwd).
   While disabled, it becomes a full-width bar fixed to the top of the screen. */
body:has(#gofwd:disabled){ padding-top:var(--bar); }

body #fxopt #gofwd:disabled{
  position:fixed;
  top:0; left:0; right:0;
  z-index:1040;
  height:var(--bar);
  width:100%;
  margin:0;
  border:0;
  border-radius:0;
  background:var(--navy);
  color:#fff;
  opacity:1;
  font:700 20px/var(--bar) Arial, Helvetica, sans-serif;
  font-variant-numeric:tabular-nums;
  letter-spacing:.5px;
  text-align:center;
  cursor:default;
  box-shadow:0 2px 8px rgba(0,0,0,.25);
  padding:0 12px;
}
body #fxopt #gofwd:disabled::before{
  content:"\23F1  Time left on this page:  ";
  font-weight:400;
  font-size:16px;
  color:#D6DCEA;
  white-space:pre;
}

/* ---------- 2. Continue button: floats bottom-right once time is up ---------- */
body #fxopt #gofwd:enabled{
  position:fixed;
  right:24px; bottom:24px;
  z-index:1040;
  min-width:220px;
  padding:16px 28px;
  border:0;
  border-radius:999px;
  background:var(--red);
  color:#fff;
  font:700 22px/1 Arial, Helvetica, sans-serif;
  cursor:pointer;
  box-shadow:0 6px 18px rgba(178,34,52,.45);
  animation:coc-pop .5s ease-out 1, coc-pulse 2s ease-in-out .5s 3;
}
body #fxopt #gofwd:enabled::after{ content:"  \2192"; white-space:pre; }
body #fxopt #gofwd:enabled:hover,
body #fxopt #gofwd:enabled:focus{ background:var(--red-dk); outline:3px solid #FFD54F; outline-offset:2px; }

@keyframes coc-pop{ from{ transform:scale(.6); opacity:0; } to{ transform:scale(1); opacity:1; } }
@keyframes coc-pulse{ 0%,100%{ box-shadow:0 6px 18px rgba(178,34,52,.45); } 50%{ box-shadow:0 0 0 10px rgba(178,34,52,.18); } }

/* keep the floating button from covering the last lines and the footer button */
body:has(#gofwd:enabled) main{ padding-bottom:110px !important; }

/* Return to Student Center: quiet outline button */
body #fxopt button[name="gohome"]{
  background:#fff;
  color:var(--navy);
  border:2px solid var(--navy);
  border-radius:8px;
  padding:10px 18px;
  font:600 16px/1.2 Arial, Helvetica, sans-serif;
  cursor:pointer;
}
body #fxopt button[name="gohome"]:hover{ background:var(--navy); color:#fff; }

/* ---------- 3. The red "timer at the bottom right" warning ---------- */
/* Becomes a calm yellow note that matches the new layout (timer at the top). */
body:has(#gofwd) main h3.text-danger{
  font-size:0 !important;
  line-height:0;
  color:transparent !important;
  background:var(--note);
  border-left:6px solid var(--note-line);
  border-radius:8px;
  padding:14px 18px;
  margin:0 0 22px;
}
body:has(#gofwd) main h3.text-danger::before{
  display:block;
  content:"Stay on this page until the timer at the top reaches 0:00. Then press Continue. Leaving the page (links, Back button) resets the timer and your time will not count.";
  font:600 17px/1.45 Arial, Helvetica, sans-serif;
  color:#3D3000;
}
/* time is up: the note turns green and points to the button */
body:has(#gofwd:enabled) main h3.text-danger{
  background:#E3F4EA;
  border-left-color:var(--done);
}
body:has(#gofwd:enabled) main h3.text-danger::before{
  content:"\2713  Time complete. Press Continue at the bottom of your screen.";
  color:var(--done);
}

/* ---------- 4. Phone fit ---------- */
#course_content img{ max-width:100%; height:auto; }
.chapter_title, .movie_label, .movie_sub, .movie_container,
.one_liners, .insurance_claims, .real_jokes, div.joke_container,
div#transcript1, div#transcript2, div#transcript3,
div#transcript4, div#transcript5, div#transcript6{
  max-width:100%;
  box-sizing:border-box;
}
#course_content table{ max-width:100%; }

@media (max-width:600px){
  :root{ --bar:48px; }
  body #fxopt #gofwd:disabled{ font-size:18px; }
  body #fxopt #gofwd:disabled::before{ content:"\23F1  Time left:  "; font-size:15px; }
  body #fxopt #gofwd:enabled{
    left:12px; right:12px; bottom:12px;
    width:auto; min-width:0;
    font-size:20px;
  }
  body:has(#gofwd) main h3.text-danger::before{ font-size:15px; }
  #content_container, #course_content{ padding-left:0; padding-right:0; }
  #course_content ul, #course_content ol{ margin-left:18px; }
  .left, .img_l, .right, .img_r, .img_lt, .img_rt{ float:none; display:block; margin:12px auto; }
  #course_content table{ display:block; overflow-x:auto; }
  body #fxopt button[name="gohome"]{ width:100%; }
  #mainNav .navbar-brand{ max-width:70%; margin-right:0; }
  #mainNav .navbar-brand img{ max-width:100%; height:auto; }
  .joke_time{ margin-left:0; width:auto; }
  .one_liners, .insurance_claims, .real_jokes{ float:none; width:auto; }
}

/* ==========================================================
   BUILD B (2026-11-23)
   ========================================================== */
:root{ --nav:64px; --bar:44px; }

/* ---------- school header pinned on chapter pages ---------- */
body:has(#gofwd) #mainNav{
  position:fixed; top:0; left:0; right:0; z-index:1042; height:var(--nav);
  padding:0; background:#fff; box-shadow:0 2px 10px rgba(20,33,61,.12); border-bottom:3px solid var(--red);
  box-sizing:border-box;
}
body:has(#gofwd) #mainNav > .container{ height:100%; flex-wrap:nowrap; }
body:has(#gofwd) #mainNav .navbar-brand{ padding:0; margin:0; }
body:has(#gofwd) #mainNav .navbar-brand img{ height:46px; width:auto; max-width:none; }
body:has(#gofwd){ padding-top:var(--nav); }
body:has(#gofwd:disabled){ padding-top:calc(var(--nav) + var(--bar)); }

/* ---------- timer bar right under the header ---------- */
body #fxopt #gofwd:disabled{
  top:var(--nav); height:var(--bar); line-height:var(--bar); z-index:1041;
  display:flex; align-items:center; justify-content:center; gap:10px;
  font:700 19px/1 Arial, Helvetica, sans-serif; font-variant-numeric:tabular-nums; letter-spacing:.03em;
  box-shadow:0 4px 10px rgba(13,23,48,.22);
}
body #fxopt #gofwd:disabled::before{
  content:"\23F1  Time left"; font:600 12px/1 Arial, Helvetica, sans-serif; letter-spacing:.12em;
  text-transform:uppercase; color:#AFC0DE;
}

/* ---------- security question pages (/security and /userverify) ---------- */
main form[action*="/security"], main form[action*="/userverify"]{
  max-width:560px; margin:8px auto 0; padding:6px 20px 20px; background:#fff;
  border:2px solid var(--navy); border-radius:12px; box-sizing:border-box;
}
main form[action*="/security"] .form-group.row, main form[action*="/userverify"] .form-group.row{
  margin:0; padding:12px 0; border-bottom:1px solid #E4DCCB;
}
main form[action*="/security"] .form-group.row > [class*="col-"], main form[action*="/userverify"] .form-group.row > [class*="col-"]{
  flex:0 0 100%; max-width:100%; padding:0;
}
main form[action*="/security"] label, main form[action*="/userverify"] label{
  display:block; text-align:left !important; padding:0 0 6px; font:600 16px/1.35 Arial, Helvetica, sans-serif; color:var(--navy);
}
main form[action*="/security"] .form-control, main form[action*="/userverify"] .form-control{
  min-height:46px; font-size:16px; border:1px solid #C9CED8; border-radius:8px; padding:10px 12px;
}
main form[action*="/security"] .form-control:focus, main form[action*="/userverify"] .form-control:focus{
  border-color:var(--navy); box-shadow:0 0 0 3px rgba(255,199,44,.6);
}
main form[action*="/security"] input[type="submit"], main form[action*="/userverify"] input[type="submit"]{
  display:block; width:100%; margin:18px 0 0; padding:15px 20px; border:0; border-radius:10px; cursor:pointer;
  background:var(--red); color:#fff; font:700 18px/1 Arial, Helvetica, sans-serif; letter-spacing:.04em;
  box-shadow:0 3px 0 #7E1624; -webkit-appearance:none; appearance:none;
}
main form[action*="/security"] input[type="submit"]:hover, main form[action*="/userverify"] input[type="submit"]:hover{ background:var(--red-dk); }
main form[action*="/security"] input[type="submit"]:active, main form[action*="/userverify"] input[type="submit"]:active{ transform:translateY(1px); box-shadow:0 1px 0 #7E1624; }
main form[action*="/security"] input[type="submit"]:focus-visible, main form[action*="/userverify"] input[type="submit"]:focus-visible{ outline:3px solid #FFD54F; outline-offset:3px; }
/* the page title and intro above the form */
main .col-md-10:has(form[action*="/security"]) > p, main .col-md-10:has(form[action*="/userverify"]) > p{
  max-width:560px; margin-left:auto; margin-right:auto;
}
main .col-md-10:has(form[action*="/security"]) > p:first-child strong,
main .col-md-10:has(form[action*="/userverify"]) > p:first-child strong{ font-size:22px; color:var(--navy); }

@media (max-width:767px){
  :root{ --nav:58px; --bar:42px; }
  body:has(#gofwd) #mainNav .navbar-brand img{ height:40px; }
  /* menu opens as a drop-down under the pinned header */
  body:has(#gofwd) #mainNav .navbar-collapse{
    position:absolute; top:100%; left:0; right:0; background:#fff; padding:6px 16px 10px;
    box-shadow:0 8px 16px rgba(0,0,0,.12);
  }
  body #fxopt #gofwd:disabled{ font-size:18px; }
  body #fxopt #gofwd:disabled::before{ content:"\23F1  Time left"; font-size:11px; }
  main form[action*="/security"], main form[action*="/userverify"]{ padding:4px 14px 16px; }
  .joke_guy, .joke_image{ float:none; width:auto; margin:0 auto 8px; text-align:center; }
}

/* ---------- 5. Print: never blank the chapter ---------- */
@media print{
  body{ padding-top:0 !important; }
  body #fxopt #gofwd{ position:static !important; box-shadow:none; }
}
