/* Thinkora V85 RC6.15 — student/public responsiveness, video-quiz interaction polish, branded loading. */

/* --------------------------------------------------------------------------
   Branded page-transition loader
   - top progress appears immediately
   - Thinkora card appears only when navigation actually takes noticeable time
   - uses the bundled Thinkora app icon; no generated artwork is required
   -------------------------------------------------------------------------- */
.pa-page-loader{
  background:transparent!important;
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
  pointer-events:none!important;
}
.pa-page-loader::before{
  content:"";
  position:absolute;
  inset:0;
  background:rgba(235,244,255,.74);
  backdrop-filter:blur(12px) saturate(1.08);
  -webkit-backdrop-filter:blur(12px) saturate(1.08);
  opacity:0;
  animation:thinkoraLoaderBackdrop .18s ease .28s forwards;
}
.pa-page-loader__progress{
  z-index:2!important;
  height:3px!important;
  background:rgba(8,127,245,.08)!important;
}
.pa-page-loader__progress::after{
  width:30%!important;
  background:linear-gradient(90deg,transparent,#087ff5,#15c8ec,#5a72ff,transparent)!important;
  animation-duration:.82s!important;
}
.pa-page-loader__card{
  position:relative;
  z-index:3;
  grid-template-columns:52px minmax(0,1fr)!important;
  gap:13px!important;
  width:min(300px,calc(100vw - 34px))!important;
  min-width:0!important;
  padding:13px 15px!important;
  border:1px solid rgba(198,219,247,.94)!important;
  border-radius:20px!important;
  background:rgba(255,255,255,.97)!important;
  box-shadow:0 26px 76px rgba(8,52,122,.18)!important;
  opacity:0;
  transform:translateY(-7px) scale(.985);
  animation:thinkoraLoaderCard .2s cubic-bezier(.2,.8,.2,1) .28s forwards!important;
}
.pa-page-loader__mark{
  width:48px!important;
  height:48px!important;
  border-radius:15px!important;
  background:
    url("../images/app-icon-192-v85.png") center/38px 38px no-repeat,
    linear-gradient(145deg,#eef8ff,#e8f4ff)!important;
  border:1px solid #d7e9ff;
  box-shadow:inset 0 1px rgba(255,255,255,.95),0 8px 20px rgba(8,127,245,.12)!important;
  overflow:visible!important;
}
.pa-page-loader__mark::before{
  width:54px!important;
  height:54px!important;
  inset:-4px!important;
  border:2px solid transparent!important;
  border-top-color:#15c8ec!important;
  border-right-color:#087ff5!important;
  animation:thinkoraLoaderSpin .9s linear infinite!important;
}
.pa-page-loader__mark::after{
  width:7px!important;
  height:7px!important;
  right:-4px!important;
  top:5px!important;
  left:auto!important;
  background:#15c8ec!important;
  box-shadow:0 0 0 5px rgba(21,200,236,.12)!important;
}
.pa-page-loader__copy{gap:3px!important}
.pa-page-loader__copy strong{font-size:.88rem!important;color:#07133f!important;letter-spacing:0!important}
.pa-page-loader__copy strong::before{content:"Thinkora · ";color:#087ff5;font-weight:850}
.pa-page-loader__copy span{display:block!important;color:#687897!important;font-size:.72rem!important}
@keyframes thinkoraLoaderBackdrop{to{opacity:1}}
@keyframes thinkoraLoaderCard{to{opacity:1;transform:none}}
@keyframes thinkoraLoaderSpin{to{transform:rotate(360deg)}}

/* --------------------------------------------------------------------------
   Public / student shell: true responsive desktop, tablet and phone behavior
   -------------------------------------------------------------------------- */
.public-app-body,.public-main,.public-main>.section,.public-main .container{min-width:0!important}
.public-main>.section{width:100%!important}
.public-main>.section>.container,.public-main>.container{max-width:none!important}
.public-main :where(h1,h2,h3,h4,p,span,strong,label){word-break:normal;overflow-wrap:break-word}

/* Desktop: use the available canvas instead of retaining a phone-width column. */
@media(min-width:1081px){
  .public-app-body.student-surface .public-main{
    margin-left:248px!important;
    width:calc(100% - 248px)!important;
    max-width:none!important;
  }
  .public-main>.section{padding:22px 0 36px!important}
  .public-main>.section>.container,.public-main>.container{
    width:min(1380px,calc(100% - 44px))!important;
    margin-inline:auto!important;
  }
  .activity-runtime{width:100%!important;max-width:none!important}
  .activity-run-head{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) minmax(220px,320px)!important;
    gap:20px!important;
    align-items:end!important;
  }
  .activity-run-head>div{min-width:0}
  .activity-run-progress{width:100%!important;min-width:0!important}
  .activity-public:not(.activity-public-video) .activity-run-question{
    width:min(960px,100%)!important;
    max-width:960px!important;
    margin-inline:auto!important;
  }

  /* The DOM already has .video-v43-student-layout as the real 2-column grid.
     The old outer 2-column grid created an empty second column and squeezed all
     student content into a narrow phone-like strip on desktop. */
  .activity-video-workspace,.video-workspace{
    display:block!important;
    width:100%!important;
    max-width:none!important;
  }
  .video-v43-student-layout{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) minmax(260px,320px)!important;
    gap:18px!important;
    align-items:start!important;
    width:100%!important;
  }
  .video-v43-main{min-width:0!important;display:grid!important;gap:16px!important}
  .video-v43-side{min-width:0!important}
  .activity-video-frame{width:100%!important;max-width:none!important;margin:0!important}
  .activity-video-workspace .activity-player-wrap{
    position:relative!important;
    top:auto!important;
    width:100%!important;
    max-width:none!important;
    margin:0!important;
  }
  .activity-public-video .activity-run-question{
    width:100%!important;
    max-width:none!important;
    margin:0!important;
    padding:clamp(20px,2vw,28px)!important;
  }
  .activity-public-video .activity-rich-stem,
  .activity-public-video .activity-stem{max-width:900px!important}
  .activity-public-video .activity-answer-list{width:100%!important;max-width:900px!important}
  .activity-public-video .activity-run-actions{max-width:900px!important}
  .activity-public-video .activity-save-state{max-width:900px!important}
  .student-bottom-nav{display:none!important}
}

/* Laptop / smaller desktop: keep a proper desktop canvas while dropping only
   the secondary video chapter rail when it would make the question too narrow. */
@media(min-width:901px) and (max-width:1240px){
  .public-main>.section>.container,.public-main>.container{width:calc(100% - 28px)!important}
  .video-v43-student-layout{grid-template-columns:1fr!important}
  .video-v43-side{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .activity-public-video .activity-run-question{width:100%!important;max-width:none!important}
}

/* Tablet */
@media(min-width:701px) and (max-width:1080px){
  .public-main>.section{padding:16px 0 28px!important}
  .public-main>.section>.container,.public-main>.container{width:calc(100% - 32px)!important;margin-inline:auto!important}
  .activity-run-head{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(190px,260px)!important;gap:14px!important;align-items:end!important}
  .activity-video-workspace,.video-workspace{display:block!important;width:100%!important}
  .video-v43-student-layout{grid-template-columns:1fr!important;width:100%!important}
  .video-v43-side{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .activity-public-video .activity-run-question{max-width:none!important;width:100%!important}
}

/* Phone */
@media(max-width:700px){
  .public-main>.section>.container,.public-main>.container{width:auto!important;max-width:none!important;margin-inline:9px!important}
  .activity-run-head{grid-template-columns:1fr!important}
  .activity-video-workspace,.video-workspace{display:block!important;width:100%!important}
  .video-v43-student-layout,.video-v43-side{grid-template-columns:1fr!important}
  .activity-public-video .activity-run-question{width:100%!important;max-width:none!important}
  .activity-answer-option{min-height:58px!important;align-items:center!important}
  .activity-answer-key{flex:0 0 38px;width:38px!important;height:38px!important}
  .activity-answer-content{min-width:0!important;line-height:1.35!important}
  .pa-page-loader__card{grid-template-columns:46px minmax(0,1fr)!important;width:min(286px,calc(100vw - 26px))!important}
  .pa-page-loader__mark{width:42px!important;height:42px!important;background-size:34px 34px!important}
  .pa-page-loader__mark::before{width:48px!important;height:48px!important}
}

/* --------------------------------------------------------------------------
   Video quiz choices: explicit visual/touch state independent of :has().
   -------------------------------------------------------------------------- */
.activity-answer-option{
  position:relative;
  z-index:0;
  user-select:none;
  -webkit-user-select:none;
  touch-action:manipulation;
}
.activity-answer-option input{pointer-events:auto!important;accent-color:#087ff5}
.activity-answer-option.is-selected,
.activity-answer-option:has(input:checked){
  border-color:#1592ff!important;
  background:#eef7ff!important;
  box-shadow:0 0 0 3px rgba(21,146,255,.12)!important;
}
.activity-answer-option.is-selected .activity-answer-key,
.activity-answer-option:has(input:checked) .activity-answer-key{
  background:linear-gradient(135deg,#1592ff,#0877ed)!important;
  color:#fff!important;
}
.activity-run-question.question-time-advisory-expired .activity-question-timer{
  color:#8a5a00!important;
  background:#fff7dc!important;
  border-color:#f6d77b!important;
}

@media(prefers-reduced-motion:reduce){
  .pa-page-loader::before,.pa-page-loader__card{animation-delay:0s!important;animation-duration:.001ms!important}
  .pa-page-loader__mark::before{animation:none!important}
}
