/* Classic TeachPen — fixes layer (2026-10-11). Loaded after skin-v2.css; every rule here repairs a
   specific bug found in a browser audit at 1366, 930 and phone widths. */

/* Returning visitors go straight to the board; the welcome screen used to come back on every visit. */
html.tp-welcomed #welcome{display:none!important}

/* The floating "Saved" badge sat on top of the Inspector's collapse button. Move it to the free top-left corner. */
.save-badge{top:64px!important;right:auto!important;left:76px!important}

/* The site cookie notice is a [role=dialog]; the classic skin painted every dialog white, which left the white
   "Essential only" button invisible. Give the notice back its own dark card. */
body.tp-skin-v2 #ct-cc{background:#08132F!important;color:#fff!important}
body.tp-skin-v2 #ct-cc :is(h1,h2,h3,h4,strong,b,p,span){color:#fff!important}
body.tp-skin-v2 #ct-cc a{color:#9DB4FF!important}

/* The Beginner pill sat on the zoom buttons (−, 100%, +) at the lower left. Lift it above them. */
body.tp-skin-v2 .beginner-pill{bottom:98px!important}

/* Classroom panel: its content ran past the bottom of the screen and the Copy button was cut off. */
.classroom-bar{max-height:calc(100vh - 150px);overflow:auto;overscroll-behavior:contain}
.cr-link input{min-width:0}

/* Command palette: a close button for touch screens, which have no Escape key. */
.cmdk{position:relative}
.cmdk-x{position:absolute;top:10px;right:10px;width:32px;height:32px;border-radius:10px;display:grid;place-items:center;
  border:0;background:transparent;color:var(--ink-3,#64748b);font-size:20px;line-height:1;cursor:pointer;z-index:2}
.cmdk-x:hover{background:rgba(15,23,42,.06);color:var(--ink,#0f172a)}

/* Narrower laptops (the 930 px window included): the top bar clipped Classroom, More and Export off the right edge.
   Drop the buttons that repeat the left tool column, then let what remains scroll instead of being cut off. */
@media (max-width:1280px){
  .brand-name,.brand-version,.brand-quicknote-link{display:none!important}
  #btn-add-text,#btn-add-box,#btn-add-eraser,#btn-move{display:none!important}
}
@media (max-width:1100px){
  body.tp-skin-v2 .topbar .modes button{font-size:0!important;gap:0!important;padding:7px 10px!important}
  body.tp-skin-v2 .topbar .modes button svg{width:16px!important;height:16px!important}
  .topbar .top-actions{min-width:0;flex:0 1 auto;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;max-width:none!important}
  .topbar .top-actions::-webkit-scrollbar{display:none}
  .topbar .top-group{flex:none}
  /* the AI button moved left to dodge the Inspector and landed on the page strip; keep it in the right corner */
  html body:has(#panel-inspector) #tp-ai-fab#tp-ai-fab{right:16px!important;bottom:84px!important;left:auto!important} /* outranks the add-on's body:has(#panel-inspector…) rule */
}

/* Phones: the Beginner pill sat on the Inspector header (the same switch is in More); the AI button and the zoom bar sat on the page strip. */
@media (max-width:720px){
  body.tp-skin-v2 .beginner-pill,.beginner-pill{display:none!important}
  html body:has(#panel-inspector) #tp-ai-fab#tp-ai-fab{right:10px!important;bottom:148px!important}
  .canvas-controls{bottom:104px!important} /* the zoom bar sat under the page strip */
  body:has(#panel-inspector:not(.collapsed)) .save-badge{display:none!important} /* it sat on the open Inspector sheet's header */
}

/* AI diagrams: connectors were painted over the cards' labels. Cards sit above their connector layer. */
.tpai-item{z-index:1}

/* Narrow screens: an expanded Inspector reached down over the page strip (previous / add / next page). Stop above it. */
@media (max-width:1100px){
  #panel-inspector:not(.collapsed){max-height:calc(100vh - 210px)!important;overflow:auto}
}

/* The More menu (Record, Replay, Presenter, Webcam, Share, Publish…) never showed: the top bar's backdrop-filter made
   the bar the containing block of the fixed-position menu, and the bar's overflow clipped it away. */
html body .topbar{backdrop-filter:none!important;-webkit-backdrop-filter:none!important}
