/* OnlineSunum — slaytlar, canlı ders ekranları ve katılım listesi */

/* ---------- Slayt ---------- */
.slide {
  background: #fff;
  color: var(--ink);
  border-radius: var(--r-l);
  box-shadow: var(--shadow-paper);
  padding: 26px 30px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow: hidden;
  --focus: #2f5bea;
}
.sl-title {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -.015em;
  line-height: 1.2;
  padding-bottom: 12px;
  border-bottom: 3px solid var(--form-soft);
  word-break: break-word;
}
.sl-cols { display: flex; gap: 26px; min-height: 0; flex: 1; }
.sl-body { flex: 1 1 56%; font-size: 1.1rem; line-height: 1.55; min-width: 0; word-break: break-word; }
.sl-body p { margin: 0 0 .7em; }
.sl-body ul { margin: 0 0 .7em; padding: 0; list-style: none; }
.sl-body li { position: relative; padding-left: 1.7em; margin-bottom: .55em; }
.sl-body li::before {
  content: '';
  position: absolute;
  left: .2em; top: .42em;
  width: .68em; height: .68em;
  border-radius: 50%;
  border: .14em solid var(--form);
}
.sl-img { flex: 1 1 44%; margin: 0; display: flex; align-items: center; justify-content: center; min-height: 0; min-width: 0; }
.sl-img img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 12px; display: block; }
.slide.text-only .sl-body { flex-basis: 100%; }
.slide.img-only { padding: 10px; }
.slide.img-only .sl-cols { height: 100%; }
.slide.img-only .sl-img { flex-basis: 100%; }
.slide.img-only .sl-img img { border-radius: 10px; }
.slide.is-q .sl-title { border-bottom-color: var(--yellow); }

/* ---------- Öğretmen: canlı ders ---------- */
body.host .hl {
  height: 100vh; height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(260px, 22vw, 380px);
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 1.8vh 1.4vw;
  padding: 2.2vh 1.8vw;
}
body.host .hl.no-side { grid-template-columns: minmax(0, 1fr); }
body.host .hl.no-side .hl-side { display: none; }
.hl-top { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 1.4vw; font-size: clamp(14px, 2vh, 24px); flex-wrap: wrap; }
.hl-top .left, .hl-top .right { display: flex; align-items: center; gap: .8vw; flex-wrap: wrap; }
.hl-main { min-height: 0; display: flex; flex-direction: column; gap: 1.6vh; }
.hl-main > .slide { flex: 1; min-height: 0; padding: 3.4vh 3vw; }
.hl-main .sl-title { font-size: clamp(22px, 5vh, 64px); }
.hl-main .sl-body { font-size: clamp(16px, 3.3vh, 42px); }
.hl-main .slide.img-only { padding: 1vh; }
.hl-q { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 1.4vw; align-items: center; min-height: 0; }
.hl-q .h-bars { height: 22vh; }
.hl-bottom { display: flex; align-items: center; justify-content: space-between; gap: 1vw; font-size: clamp(14px, 2vh, 24px); flex-wrap: wrap; }
.hl-bottom .mid { color: var(--chalk-2); font-variant-numeric: tabular-nums; text-align: center; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hl-bottom .mid b { color: var(--chalk); }
.hl-nav { display: flex; gap: .6vw; align-items: center; }
.hl-nav .btn { font-size: clamp(15px, 2.2vh, 26px); }

.hl-side { grid-row: 2 / span 2; grid-column: 2; background: rgba(0, 0, 0, .2); border-radius: 18px; display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.hl-side-head { padding: 14px 14px 10px; }
.hl-side-head h3 { font-size: 1rem; margin-bottom: 10px; display: flex; justify-content: space-between; align-items: baseline; }
.hl-side-head h3 small { color: var(--chalk-2); font-weight: 500; font-size: .82rem; }
.cnts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.cnt { border-radius: 10px; padding: 6px 9px; background: rgba(0, 0, 0, .18); display: flex; justify-content: space-between; align-items: center; font-size: .86rem; gap: 6px; }
.cnt b { font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.cnt.in b { color: #6fe3a1; }
.cnt.away { background: rgba(255, 93, 108, .22); }
.cnt.away b { color: #ffb3bb; }
.cnt.off b { color: #cfd8d3; }
.cnt.abs b { color: var(--yellow); }
.att-list { flex: 1; overflow-y: auto; padding: 0 8px 10px; min-height: 0; }
.att-sec { font-size: .78rem; color: var(--chalk-3); padding: 10px 6px 4px; font-weight: 600; }
.att {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center; gap: 2px 10px;
  padding: 8px 8px; border-radius: 10px;
  font-size: .93rem;
}
.att + .att { margin-top: 2px; }
.att .dot { width: 10px; height: 10px; border-radius: 50%; background: #45d185; grid-row: span 2; box-shadow: 0 0 0 3px rgba(69, 209, 133, .18); }
.att b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att small { grid-column: 2; color: var(--chalk-3); font-size: .78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att .x { grid-row: span 2; background: none; border: 0; color: var(--chalk-3); cursor: pointer; padding: 4px; border-radius: 8px; opacity: 0; transition: opacity .15s; }
.att:hover .x, .att .x:focus-visible { opacity: 1; }
.att .x:hover { color: #fff; background: rgba(0, 0, 0, .25); }
.att.away { background: rgba(255, 93, 108, .2); }
.att.away .dot { background: #ff5d6c; box-shadow: 0 0 0 3px rgba(255, 93, 108, .25); animation: blink 1.2s infinite; }
.att.away small { color: #ffc9cf; }
.att.off { opacity: .8; }
.att.off .dot { background: #9aa7a1; box-shadow: none; }
.att.abs { opacity: .62; }
.att.abs .dot { background: transparent; box-shadow: inset 0 0 0 2px var(--chalk-3); }
.att .ans { color: #6fe3a1; display: inline-flex; vertical-align: -2px; margin-left: 4px; }
@keyframes blink { 50% { opacity: .35; } }

.hl-alerts { position: fixed; top: 14px; right: 14px; z-index: 600; display: flex; flex-direction: column; gap: 8px; width: min(360px, calc(100vw - 28px)); pointer-events: none; }
.hl-alert { background: #fff; color: var(--ink); border-radius: 12px; padding: 10px 14px; box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .5); display: flex; gap: 10px; align-items: center; font-size: .95rem; animation: toastIn .2s ease-out; border-left: 5px solid var(--bad); pointer-events: auto; }
.hl-alert.ok { border-left-color: var(--ok); }
.hl-alert.warn { border-left-color: var(--yellow-deep); }
.hl-alert .ic { color: var(--bad); }
.hl-alert.ok .ic { color: var(--ok); }
.hl-alert.warn .ic { color: var(--yellow-deep); }

.hl-lobby { grid-column: 1; display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 2vh; min-height: 0; }
.hl-notes { background: rgba(0, 0, 0, .2); border-radius: 12px; padding: 10px 14px; color: var(--chalk-2); font-size: clamp(13px, 1.8vh, 20px); white-space: pre-line; max-height: 14vh; overflow: auto; }
.hl-notes b { color: var(--chalk); }

/* ---------- Öğrenci ---------- */
.st-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.st-top .ttl { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.st-top .ttl small { display: block; font-weight: 400; color: var(--chalk-2); font-size: .82rem; }
.st-live { display: inline-flex; align-items: center; gap: .45em; font-size: .82rem; font-weight: 600; background: rgba(0, 0, 0, .2); border-radius: 999px; padding: .35em .75em; white-space: nowrap; }
.st-live i { width: 8px; height: 8px; border-radius: 50%; background: #45d185; box-shadow: 0 0 0 3px rgba(69, 209, 133, .25); }
.st-slide .slide { padding: 18px 18px 20px; gap: 12px; }
.st-slide .sl-cols { flex-direction: column; gap: 14px; }
.st-slide .sl-title { font-size: 1.32rem; padding-bottom: 10px; }
.st-slide .sl-body { font-size: 1.04rem; }
.st-slide .sl-img img { max-height: 46vh; }
.st-slide .slide.img-only { padding: 6px; }
.st-slide .slide.img-only .sl-img img { max-height: 72vh; }
.st-qinfo { margin-top: 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--chalk-2); font-weight: 600; }
.st-msg { margin-top: 14px; text-align: center; color: var(--chalk-2); }
.st-msg b { color: var(--chalk); }
.st-banner { position: fixed; left: 12px; right: 12px; top: 12px; z-index: 700; background: var(--bad); color: #fff; border-radius: 14px; padding: 12px 14px; font-weight: 600; box-shadow: 0 14px 30px -12px rgba(0, 0, 0, .55); display: flex; gap: 10px; align-items: flex-start; animation: toastIn .2s ease-out; }
.st-banner .ic { flex: none; margin-top: 2px; }
.st-res { margin-top: 12px; padding: 12px 14px; border-radius: 14px; display: flex; gap: 10px; align-items: center; font-weight: 700; }
.st-res.ok { background: var(--ok); color: #fff; }
.st-res.bad { background: var(--bad); color: #fff; }
.st-res.none { background: rgba(0, 0, 0, .22); }
.p-tiles .tile.is-right { box-shadow: inset 0 0 0 4px var(--ok), 0 5px 0 var(--cd); opacity: 1; }
.p-tiles .tile.is-right::after { content: '✓'; margin-left: auto; font-weight: 800; color: var(--ok); font-size: 1.2em; }
.st-wl { font-size: .78rem; color: var(--chalk-3); text-align: center; margin-top: 12px; }

/* ---------- Öğretmen ekranı telefonda ---------- */
@media (max-width: 860px), (max-aspect-ratio: 1/1) {
  body.host { overflow: auto; }
  body.host .hl, body.host .hl.no-side { height: auto; min-height: 100vh; grid-template-columns: 1fr; grid-template-rows: auto; padding: 12px; gap: 12px; }
  .hl-side { grid-row: auto; grid-column: 1; max-height: none; }
  body.host .hl.no-side .hl-side { display: flex; }
  .hl-main > .slide { max-height: 58vh; padding: 18px; }
  .hl-main .sl-title { font-size: 20px; }
  .hl-main .sl-body { font-size: 16px; }
  .hl-main .sl-cols { flex-direction: column; }
  .hl-main .sl-img img { max-height: 30vh; }
  .hl-bottom { position: sticky; bottom: 0; background: var(--board); padding: 8px 0; z-index: 5; }
  .hl-bottom .mid { order: -1; flex-basis: 100%; }
  .hl-nav { width: 100%; justify-content: space-between; }
  .hl-top .lbl, .h-tool[data-act="full"], .h-tool[data-act="side"] { display: none; }
  .att .x { opacity: 1; }
  .hl-q { grid-template-columns: 1fr 1fr; }
  .hl-q .h-bars { grid-column: 1 / -1; grid-row: 1; height: 150px; }
  .hl-lobby .h-join { grid-template-columns: 1fr; text-align: center; justify-items: center; }
}
