/* themes.diyrace.com: the live theme viewer (themes.js). Builds on admin.css. */
a.brandmark { color: #fff; text-decoration: none; }
main { max-width: 1180px; }
.crumbs { margin: 18px 0 6px; font-size: 14px; }
.crumbs a { color: var(--orange-deep); text-decoration: none; font-weight: 600; }
.sub { color: var(--muted); font-size: 14px; margin: 2px 0 0; }
.small { font-size: 13px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }

/* Chips */
.chip { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: var(--cream); color: var(--dark); white-space: nowrap; }
.chip.done, .chip.live, .chip.approved { background: #DDF3E4; color: #1D6B3A; }
.chip.missing, .chip.draft { background: #F3EEEA; color: var(--muted); }
.chip.stale, .chip.off, .chip.rendered, .chip.info { background: #FFF1D6; color: #8A5A00; }
.chip.problem, .chip.over { background: #FBE1DE; color: var(--red); }
.chip.stage { background: var(--dark); color: #fff; text-transform: uppercase; letter-spacing: .4px; }
.chip.racenow { background: var(--orange); color: #fff; }

/* Theme list */
.themegrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; margin-top: 16px; }
.themecard { display: block; background: #fff; border-radius: 14px; overflow: hidden; text-decoration: none; color: inherit;
  box-shadow: 0 4px 16px rgba(255,123,37,.07); border: 1px solid transparent; }
.themecard:hover { border-color: var(--orange-light); }
.themecard .hero { height: 120px; background: linear-gradient(135deg, var(--orange-light), var(--orange), var(--orange-deep)) center / cover; position: relative; }
.themecard .hero .swatches { position: absolute; left: 10px; bottom: 10px; display: flex; gap: 4px; }
.themecard .body { padding: 12px 14px 14px; }
.themecard h3 { font-size: 26px; }
.bar { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; margin: 8px 0 4px; }
.bar > i { display: block; height: 100%; background: var(--orange); }

/* Theme page */
.themehead { display: flex; gap: 16px; align-items: flex-end; flex-wrap: wrap; margin: 6px 0 14px; }
.themehead h1 { font-size: 52px; margin: 0; }
.jump { position: sticky; top: 0; z-index: 5; background: var(--paper); padding: 8px 24px; margin-left: -24px; margin-right: -24px; display: flex; gap: 6px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.jump a { font-family: "Teko", sans-serif; font-size: 20px; text-transform: uppercase; text-decoration: none; color: var(--muted); padding: 0 8px; }
.jump a:hover { color: var(--orange); }
section.card > h2 { margin-bottom: 10px; }

.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { display: grid; grid-template-columns: 90px 1fr; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); font-size: 14px; }
.checklist li:first-child { border-top: none; }
.checklist .how { color: var(--muted); font-size: 12px; }
details > summary { cursor: pointer; font-weight: 700; margin: 10px 0 4px; }

.swatchrow { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.swatch { display: flex; gap: 8px; align-items: center; font-size: 12px; }
.swatch i { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line); flex: none; }
.dot { display: inline-block; width: 16px; height: 16px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.15); }
.gradient { height: 26px; border-radius: 8px; margin-top: 8px; }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 6px 14px; font-size: 14px; }
.kv dt { color: var(--muted); font-weight: 600; }
.kv dd { margin: 0; white-space: pre-wrap; }

/* Script */
.cue { border-top: 2px solid var(--line); padding: 14px 0 6px; }
.cue:first-of-type { border-top: none; }
.cuehead { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.cuehead h3 { font-size: 24px; }
.cuepurpose { color: var(--muted); font-size: 13px; margin: 2px 0 8px; }
.line { display: grid; grid-template-columns: 26px 1fr auto; gap: 10px; align-items: start; padding: 8px 10px; border-radius: 10px; }
.line:nth-child(odd) { background: var(--paper); }
.line .n { font-family: "Teko", sans-serif; font-size: 20px; color: var(--muted); }
.line .text { font-size: 15px; }
.line .tag { color: var(--orange-deep); font-style: italic; }
.line .fx { color: var(--muted); font-size: 12px; margin-top: 3px; }
.line .meta { display: flex; flex-direction: column; gap: 4px; align-items: flex-end; min-width: 220px; }
audio { height: 32px; max-width: 260px; }

/* Visuals */
.visgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.vis { background: var(--paper); border-radius: 12px; overflow: hidden; }
.vis .media { aspect-ratio: 9 / 19.5; background: var(--dark) center / cover; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 13px; }
.vis .media.wide { aspect-ratio: 1092 / 360; }
.vis .media.card { aspect-ratio: 3 / 1; }
.vis .media img, .vis .media video { width: 100%; height: 100%; object-fit: cover; display: block; }
.vis .cap { padding: 8px 10px; font-size: 13px; }
.vis .cap b { display: block; }

table.clips { width: 100%; border-collapse: collapse; font-size: 14px; }
table.clips td, table.clips th { text-align: left; padding: 7px 6px; border-top: 1px solid var(--line); vertical-align: middle; }
table.clips th { font-size: 12px; color: var(--muted); border-top: none; }

.history li { font-size: 13px; padding: 5px 0; border-top: 1px solid var(--line); list-style: none; }
.history { padding: 0; margin: 0; }
.empty { color: var(--muted); font-style: italic; }
@media (max-width: 700px) {
  .line { grid-template-columns: 22px 1fr; }
  .line .meta { grid-column: 2; align-items: flex-start; min-width: 0; }
  .kv { grid-template-columns: 1fr; }
  .themehead h1 { font-size: 40px; }
}

/* Editing, comments, collaborators */
button.mini { padding: 4px 10px; font-size: 13px; border-radius: 8px; }
.linkbtn { background: none; border: none; padding: 0; color: var(--orange-deep); font-weight: 600; font-size: 13px; cursor: pointer; margin-left: 8px; }
.linkbtn:first-child { margin-left: 0; }
.editable { display: inline; }
.editbox textarea, .editbox input, .lineedit textarea, .lineedit input { margin-top: 0; }
.editbox, .lineedit { width: 100%; }
.lineedit label { margin: 0; }
.editnote { margin: 0 0 14px; }
.swatch input[type=color] { width: 34px; height: 34px; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: none; cursor: pointer; flex: none; }
.comments.has { color: var(--red); }
.threadwrap { width: 100%; }
.thread { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; margin-top: 6px; display: flex; flex-direction: column; gap: 8px; }
.thread textarea { margin-top: 0; min-height: 44px; }
.comment { font-size: 14px; border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.comment .who { font-size: 12px; color: var(--muted); }
.comment.resolved { opacity: .55; }
.addline { margin: 6px 0 0 36px; }
.people { padding: 0; margin: 6px 0 0; list-style: none; }
.people li { padding: 5px 0; border-top: 1px solid var(--line); font-size: 14px; }
.teamcard summary { cursor: pointer; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--dark); color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 14px; z-index: 50; box-shadow: 0 6px 20px rgba(0,0,0,.2); max-width: 90vw; }
.toast.bad { background: var(--red); }
.cap .threadwrap, .cap .comments { margin-top: 6px; display: block; }
