/* Class handover dialogs. Builds on the shared dialog styles in account-security.css. */
.handover-dialog { width: min(30rem, calc(100vw - 2rem)); }
.handover-dialog :is(h2):focus { outline: none; }
.handover-body { padding: 1.25rem; }
.handover-body > p { color: #2c4260; }
.handover-dialog .handover-primary { background: #ffbd38; border-color: #f8ad18; font-weight: 700; }
.handover-options { display: grid; gap: .6rem; margin: 0 0 1rem; padding: 0; border: 0; }
.handover-dialog label.handover-option {
  display: flex;
  align-items: flex-start;
  gap: .7rem;
  padding: .8rem .9rem;
  border: 1px solid #d6e1ee;
  border-radius: 12px;
  background: #f7faff;
  font-weight: 400;
  cursor: pointer;
}
.handover-option:has(input:checked) { border-color: #1f5aa6; background: #eaf2ff; box-shadow: 0 0 0 1px #1f5aa6; }
.handover-dialog .handover-option input { flex: none; width: 1.15rem; height: 1.15rem; min-height: 0; margin: .15rem 0 0; padding: 0; accent-color: #1f5aa6; }
.handover-option span { display: grid; gap: .15rem; }
.handover-option small { color: #45607e; font-size: .88rem; line-height: 1.4; }
.handover-points { margin: 0 0 1rem; padding-inline-start: 1.2rem; display: grid; gap: .45rem; color: #2c4260; font-size: .92rem; line-height: 1.45; }
.handover-waiting {
  display: grid;
  gap: .35rem;
  margin-block-end: 1rem;
  padding: .7rem .85rem;
  border-radius: 12px;
  background: #fff7e3;
  color: #6b4a00;
  font-size: .9rem;
}
.handover-dialog .handover-link-button {
  justify-self: start;
  min-height: 0;
  padding: .1rem 0;
  border: 0;
  background: none;
  color: #1f5aa6;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.handover-code {
  margin: .4rem 0 .9rem;
  padding: .8rem;
  border: 2px dashed #1f5aa6;
  border-radius: 14px;
  background: #f3f8ff;
  color: #0f2f5c;
  font: 800 2.1rem/1.1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: .18em;
  text-align: center;
}
.handover-dialog input.handover-link { box-sizing: border-box; width: 100%; margin-block-end: .8rem; color: #45607e; font-size: .85rem; }
.handover-hint { color: #45607e; font-size: .9rem; }
.handover-dialog input.handover-input {
  box-sizing: border-box;
  width: 100%;
  font: 700 1.5rem/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: .15em;
  text-align: center;
  text-transform: uppercase;
}
.handover-form { padding: 0 !important; margin-block-end: 1rem; }
.handover-preview { display: grid; gap: .25rem; margin-block-end: 1rem; }
.handover-preview p { margin: 0; }
.handover-preview strong { font-size: 1.2rem; }
.handover-preview small { color: #45607e; margin-block-end: .4rem; }
.handover-preview .handover-hint { margin-block-start: .35rem; font-size: .85rem; }
.handover-dialog .session-actions { margin-top: .5rem; }
.handover-dialog[data-stage="result"] .handover-body { text-align: center; }
.handover-dialog[data-stage="result"] .session-actions { justify-content: center; }
.handover-dialog[data-stage="result"] .session-actions button { width: 100%; }

:root[data-climb-theme="dark"] .handover-dialog {
  color: var(--theme-ink);
  background: var(--theme-elevated);
  border-color: var(--theme-elevated-line);
  box-shadow: var(--theme-shadow);
}
:root[data-climb-theme="dark"] .handover-dialog :is(.handover-body > p, .handover-points, .handover-option small, .handover-hint, .handover-preview small) { color: var(--theme-muted, #b9c6d8); }
:root[data-climb-theme="dark"] .handover-dialog :is(.session-card, .session-status, .handover-option, .handover-code) {
  color: var(--theme-ink);
  background: var(--theme-surface);
  border-color: var(--theme-line);
}
:root[data-climb-theme="dark"] .handover-dialog .handover-option:has(input:checked) { border-color: #7fb0ff; box-shadow: 0 0 0 1px #7fb0ff; }
:root[data-climb-theme="dark"] .handover-dialog .handover-code { border-color: #7fb0ff; }
:root[data-climb-theme="dark"] .handover-dialog .handover-waiting { background: #3a2f12; color: #ffe2a3; }
:root[data-climb-theme="dark"] .handover-dialog .handover-link-button { color: #9cc3ff; }
:root[data-climb-theme="dark"] .handover-dialog :is(button:not(.handover-primary, .handover-link-button), input) {
  color: var(--theme-ink);
  background: var(--theme-surface);
  border-color: var(--theme-line);
}
:root[data-climb-theme="dark"] .handover-dialog .handover-primary { color: #1b1400; }

/* Menu icons, matching the other Class and Account menu actions. */
.signed-in-dashboard #classMenuPanel #handoverClassBtn {--action-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2034%2034%22%3E%3Crect%20width%3D%2234%22%20height%3D%2234%22%20rx%3D%228%22%20fill%3D%22%23dcf7ef%22%2F%3E%3Cpath%20transform%3D%22translate%287%207%29%20scale%28.84%29%22%20stroke%3D%22%23147668%22%20fill%3D%22none%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20d%3D%22M4%2012h14m-5-5%205%205-5%205M20%204v16%22%2F%3E%3C%2Fsvg%3E")}
.signed-in-dashboard #teacherMenuPanel #receiveClassBtn {--action-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2034%2034%22%3E%3Crect%20width%3D%2234%22%20height%3D%2234%22%20rx%3D%228%22%20fill%3D%22%23e6f0ff%22%2F%3E%3Cpath%20transform%3D%22translate%287%207%29%20scale%28.84%29%22%20stroke%3D%22%231d58b9%22%20fill%3D%22none%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20d%3D%22M20%2012H6m5-5-5%205%205%205M4%204v16%22%2F%3E%3C%2Fsvg%3E")}
.signed-in-dashboard :is(#classMenuPanel #handoverClassBtn, #teacherMenuPanel #receiveClassBtn)::before {
  content:"";flex:none;width:28px;height:28px;margin-inline-end:3px;border-radius:7px;
  background:var(--action-icon) center / contain no-repeat;padding:0;
}
