/* =========================================================
   Award Certificates (School hub, version 50)
   Loaded after theme.css on the tool pages. Same frame as the Class Schedule (.tk): the form on the left, the preview
   on the right. School green takes the place of safety yellow inside this tool. On phones the Details and Preview tabs
   switch panes. The certificate takes its colors from the print themes (--pt-*), so the Sheet style menu changes it.
   ========================================================= */
@media screen {

#panel-awards {
  --mascot: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 50 58'%3E%3Cellipse cx='25' cy='54' rx='18' ry='3' fill='%231B2125' opacity='.15'/%3E%3Cg transform='translate(1 4)'%3E%3Cpath d='M11 8h24a3 3 0 0 1 3 3v35H14a3 3 0 0 1-3-3z' fill='%236BCB77' stroke='%231B2125' stroke-width='2.4' stroke-linejoin='round'/%3E%3Cpath d='M16 8v38' stroke='%231B2125' stroke-width='2'/%3E%3Cpath d='M29 8v11l3-3 3 3V8' fill='%23fff' stroke='%231B2125' stroke-width='1.8' stroke-linejoin='round'/%3E%3Ccircle cx='22' cy='24' r='2.2' fill='%231B2125'/%3E%3Ccircle cx='31' cy='24' r='2.2' fill='%231B2125'/%3E%3Cpath d='M24 29q2.5 2.8 5 0' fill='none' stroke='%231B2125' stroke-width='2' stroke-linecap='round'/%3E%3Cellipse cx='19' cy='29' rx='2.4' ry='1.5' fill='%23F4B6B0'/%3E%3Cellipse cx='34' cy='29' rx='2.4' ry='1.5' fill='%23F4B6B0'/%3E%3C/g%3E%3C/svg%3E"); --mascot-w: 52px; --mascot-h: 60px; --note: "one name, one certificate";
  --yel: #6bcb77; --yel-hover: #84d58e; --yel-soft: #ddf2e0; --yel-line: #b5e3bb; --yel-ink: #1f5a28; --on-yel: #1b2125; --hl: #6bcb77;
}
:root:lang(es) #panel-awards { --note: "un nombre, un certificado"; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-tc-theme="light"]) #panel-awards { --yel-soft: #15301a; --yel-line: #2a5531; --yel-ink: #a8e2b0; --hl: #2e6b37; }
}
:root[data-theme="dark"]:not([data-tc-theme="light"]) #panel-awards, :root[data-tc-theme="dark"] #panel-awards { --yel-soft: #15301a; --yel-line: #2a5531; --yel-ink: #a8e2b0; --hl: #2e6b37; }

/* ---------- the frame: the form on the left, the preview on the right ---------- */
.aw .tk-main { grid-template-columns: minmax(280px, 350px) minmax(0, 1fr); }
.aw-form-pane { background: var(--canvas); }
@media (min-width: 921px) { .aw-form-pane { border-right: 2px solid var(--edge); border-radius: 16px 0 0 16px; } }
.aw .tk-try, .aw .notice, .aw .warn { margin: 6px 0 0; }
.aw-form { display: grid; gap: 14px; margin-top: 8px; }
.aw-form .tk-l em { font-style: normal; font-weight: 400; color: var(--muted); }
.aw-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: end; gap: 10px; }
.aw-form textarea.tk-in { min-height: 132px; }
.aw-count { margin: 4px 0 0; font-size: 13.5px; font-weight: 600; color: var(--ink); }
.aw-form fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.aw-form legend { padding: 0; margin-bottom: 6px; }

/* ---------- the preview ---------- */
.aw-prev-pane { display: grid; gap: 12px; align-content: start; }
.aw-prev-pane > .tk-pane-h { flex-wrap: wrap; }
.aw-paper { margin: 0; padding: 14px; border-radius: 12px; background: var(--canvas); border: 1px solid var(--line); overflow: hidden; }
.aw-paper .aw-cert { box-shadow: 0 1px 2px rgba(17, 22, 24, .14), 0 10px 26px rgba(17, 22, 24, .14); }
.aw-pager { display: flex; align-items: center; justify-content: center; gap: 12px; }
.aw-pager[hidden] { display: none; }
.aw-pbtn { width: 40px; height: 40px; display: grid; place-items: center; padding: 0; border: 2px solid var(--edge); border-radius: 10px; background: var(--surface); color: var(--ink); cursor: pointer; }
.aw-pbtn:disabled { border-style: dashed; color: var(--soft); cursor: default; }
.aw-pbtn svg { width: 18px; height: 18px; }
.aw-page { min-width: 7ch; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }
.aw-printrow { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.aw-printrow .tk-hint { flex: 1 1 220px; margin: 0; }
.aw-printrow svg { width: 18px; height: 18px; flex: none; }

/* ---------- phones: one pane at a time ---------- */
@media (max-width: 920px) {
  .aw .tk-main { display: block; }
  .aw[data-pane="form"] .aw-prev-pane, .aw[data-pane="preview"] .aw-form-pane { display: none; }
  .aw-form-pane { background: var(--surface); }
  .aw-paper { padding: 8px; }
  .aw-printrow .tk-btn { flex: 1 1 auto; }
}

} /* end screen */

/* ---------- the certificate (preview and paper): 10 by 7.5 inches, letter sideways inside half-inch margins ---------- */
.aw-cert { position: relative; width: 960px; height: 720px; overflow: hidden; background: #fff; color: #1b2125; font-family: var(--f-cond); line-height: 1.15; text-align: center; }
.aw-cert * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.aw-frame { position: absolute; inset: 0; border: 10px solid var(--pt-head); }
.aw-frame::before { content: ""; position: absolute; inset: 8px; border: 2px solid var(--pt-accent); }
.aw-frame::after { content: ""; position: absolute; inset: 16px; border: 1px solid var(--pt-rule); }
.aw-in { position: absolute; inset: 48px 64px 34px; display: flex; flex-direction: column; align-items: center; }
.aw-school { min-height: 22px; font: 700 18px/1.2 var(--f-cond); letter-spacing: .06em; text-transform: uppercase; color: var(--pt-label); }
.aw-kicker { margin-top: 10px; font: 600 15px/1.2 var(--f-ui); letter-spacing: .14em; text-transform: uppercase; color: var(--pt-sub); }
.aw-title { margin-top: 10px; display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--pt-head); }
.aw-title .aw-l1 { font: 700 64px/1 var(--f-cond); letter-spacing: .01em; }
.aw-title .aw-l2 { font: 700 30px/1.1 var(--f-cond); opacity: .8; }
.aw-lead { margin-top: 22px; font: 500 17px/1.2 var(--f-ui); color: var(--pt-sub); }
.aw-name { width: 78%; margin-top: 8px; padding-bottom: 8px; border-bottom: 2px solid var(--pt-line); font: 700 64px/1.08 var(--f-cond); white-space: nowrap; overflow: hidden; color: #1b2125; }
.aw-name.empty { color: var(--pt-label); font-weight: 600; font-style: italic; }   /* the stand-in until a name is typed (readable, but not a name) */
.aw-for { margin-top: 14px; display: flex; flex-direction: column; align-items: center; gap: 3px; max-width: 86%; font: 500 20px/1.3 var(--f-ui); color: #2d363c; }
.aw-for .aw-l2 { font-size: 16px; color: var(--pt-sub); }
.aw-when { margin-top: 2px; font-weight: 700; color: #1b2125; }
.aw-bottom { margin-top: auto; width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) 150px minmax(0, 1fr); align-items: end; gap: 24px; }
.aw-sig { padding-top: 6px; border-top: 1.5px solid var(--pt-head); display: flex; flex-direction: column; gap: 2px; }
.aw-sig b { font: 700 19px/1.2 var(--f-cond); min-height: 23px; }
.aw-sig span { font: 500 13px/1.25 var(--f-ui); color: var(--pt-label); }
.aw-sig.blank { border-top: 0; }
.aw-mid { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.aw-seal { width: 96px; height: 120px; }
.aw-burst { fill: var(--pt-accent); stroke: var(--pt-head); stroke-width: 2.5; stroke-linejoin: round; }
.aw-ring { fill: #fff; stroke: var(--pt-head); stroke-width: 2.5; }
.aw-star { fill: var(--pt-head); }
.aw-tail { fill: var(--pt-head); }
.aw-date { font: 600 13px/1.25 var(--f-ui); color: var(--pt-label); white-space: nowrap; }
.aw-made { margin-top: 12px; font: 500 10px/1 var(--f-ui); color: var(--pt-label); }
[data-pt="ink"] .aw-frame { border-width: 4px; }
[data-pt="ink"] .aw-burst { fill: #fff; }

/* printing: one certificate per page */
#print-root .aw-pg { break-after: page; page-break-after: always; }
#print-root .aw-pg:last-child { break-after: auto; page-break-after: auto; }
@media print {
  .aw-form-pane, .tk-panes, .aw-pager, .aw-printrow { display: none !important; }
}
