/* Charlotte List themes: the shared pieces of every event theme.
   The colors, the title font and the page background come from a small <style> block that app/themes.php prints.
   This file is only loaded on themed pages, on the theme gallery and on the host's Look tab. */

/* Form fields stay white with dark text on every theme, so typing is always easy to read. */
input[type=text],input[type=email],input[type=date],input[type=time],input[type=number],input[type=tel],input[type=password],input[type=url],input[type=search],input[type=datetime-local],select,textarea{background:#fff;color:#1B1033}

/* The title and card headings use the theme font. Without a theme they keep the site font. */
h1{font-family:var(--th-font,var(--font-display));text-transform:var(--th-case,uppercase);text-shadow:var(--th-title-shadow,none);word-spacing:var(--th-space,normal)}
.card h2{font-family:var(--th-font2,var(--font-display));text-transform:var(--th-case2,uppercase)}

/* The drawings. Colors come from the theme, never from the drawing. */
.th-art svg *{fill:none;stroke:var(--mi,#1B1033);stroke-width:2.5;stroke-linejoin:round;stroke-linecap:round}
.th-art svg .f1{fill:var(--m1,#19C7B9)}
.th-art svg .f2{fill:var(--m2,#FFD23F)}
.th-art svg .f3{fill:var(--m3,#FF6FAE)}
.th-art svg .fw{fill:#fff}
.th-art svg .fi{fill:var(--mi,#1B1033)}
.th-art svg .nf{fill:none;stroke:var(--ml,#1B1033)}
.th-art svg .ns{stroke:none}
.th-art svg .s1,.th-art svg .s2,.th-art svg .s3{fill:none;stroke-width:5}
.th-art svg .s1{stroke:var(--m1,#19C7B9)}
.th-art svg .s2{stroke:var(--m2,#FFD23F)}
.th-art svg .s3{stroke:var(--m3,#FF6FAE)}

/* Event page: a sticker with the theme's words, then a row of drawings. */
.th-kicker{display:inline-block;margin:10px 0 0;padding:4px 12px 3px;font-family:var(--font-display);font-size:14px;letter-spacing:.05em;text-transform:uppercase;background:var(--accent);color:var(--accent-ink);border:2px solid var(--ink);border-radius:4px;box-shadow:3px 3px 0 var(--ink);transform:rotate(-1.5deg)}
.th-strip{display:flex;flex-wrap:wrap;justify-content:space-between;gap:10px 14px;height:46px;overflow:hidden;margin-top:16px}
.th-strip svg{display:block;flex:none;width:44px;height:44px}
.th-strip svg:nth-child(odd){transform:rotate(-8deg)}
.th-strip svg:nth-child(even){transform:rotate(7deg) scale(.9)}

/* Small preview of a theme: used in the gallery and in the host's theme picker. Its colors are set on the element. */
.th-mini{display:flex;flex-direction:column;align-items:flex-start;gap:6px;padding:12px 12px 14px;border:3px solid #1B1033;border-radius:6px;background-color:var(--bg);color:var(--ink);overflow:hidden;min-height:176px}
.th-mini-kicker{font-family:var(--font-display);font-size:9px;letter-spacing:.05em;text-transform:uppercase;padding:2px 6px 1px;background:var(--accent);color:var(--accent-ink);border:1.5px solid var(--ink);border-radius:3px;transform:rotate(-1.5deg)}
.th-mini-title{font-family:var(--th-font);text-transform:var(--th-case);font-size:22px;line-height:1.1;color:var(--brand);text-shadow:var(--th-title-shadow);word-spacing:var(--th-space);overflow-wrap:anywhere}
.th-mini-strip{display:flex;gap:6px}
.th-mini-strip svg{display:block;width:26px;height:26px}
.th-mini-card{display:flex;align-items:center;justify-content:space-between;gap:8px;align-self:stretch;margin-top:auto;padding:7px 8px;background:var(--surface);border:2px solid var(--ink);border-radius:4px;box-shadow:var(--shadow-sm);font-size:11px;font-weight:700}
.th-mini-btn{font-family:var(--font-display);font-size:9px;text-transform:uppercase;padding:4px 9px 3px;border:2px solid var(--ink);border-radius:999px;background:var(--accent);color:var(--accent-ink)}

/* Theme gallery */
.th-grid{list-style:none;margin:14px 0 0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:18px 16px}
.th-grid a{display:block;color:var(--ink);text-decoration:none}
.th-grid a:hover .th-mini{transform:translate(-2px,-2px);box-shadow:6px 6px 0 #1B1033}
.th-grid .th-mini{box-shadow:4px 4px 0 #1B1033;transition:transform .08s ease,box-shadow .08s ease}
.th-name{display:block;font-weight:700;margin-top:8px}
.th-when{display:block;color:var(--muted);font-size:13px}

/* Host picker on the Look tab */
fieldset.th-pick{border:0;margin:16px 0 0;padding:0;min-width:0}
fieldset.th-pick legend{font-weight:700;font-size:15px;padding:0;margin-bottom:8px}
.th-tiles{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:14px 12px}
.th-tile label{display:block;margin:0;font-weight:400;cursor:pointer}
.th-tile input{position:absolute;opacity:0;width:1px;height:1px}
.th-tile .th-mini{min-height:150px}
.th-tile input:checked + .th-mini{outline:4px solid var(--brand);outline-offset:2px}
.th-tile input:focus-visible + .th-mini{outline:4px solid var(--ink);outline-offset:2px}
.th-tile .th-name{font-size:14px;margin-top:6px}
.th-tile .th-prev{font-size:13px;font-weight:700}
