/*
 * Textstr app theme, 2026.
 *
 * A layer on top of Foundation 5, loaded last so it wins on cascade order.
 * It changes no markup and no JavaScript, which is deliberate: Foundation's
 * grid classes are spread across forty view templates and foundation.min.js
 * drives the dropdowns and modals, so touching either risks the parts of this
 * app that carry real customer messages.
 *
 * Everything here is colour, type, spacing and control styling. Remove the one
 * <link> that loads it and the app is exactly as it was.
 *
 * Palette matches the marketing site: the greens are sampled from the original
 * wordmark, so the two properties finally look related.
 */

:root {
  --tx-brand: #5CDD54;
  --tx-brand-deep: #2E9E3A;
  --tx-brand-wash: #EEFBEC;
  --tx-ink: #0B0F14;
  --tx-ink-2: #151C25;
  --tx-mut: #5D6B7A;
  --tx-faint: #93A0AD;
  --tx-paper: #FAFAF7;
  --tx-warm: #F2F2EC;
  --tx-line: #E2E3DB;
  --tx-danger: #D64545;
  --tx-sans: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --tx-display: 'Bricolage Grotesque', Georgia, serif;
  --tx-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --tx-radius: 10px;
}

/* ---------- type ---------- */
body {
  background: var(--tx-paper);
  color: var(--tx-ink);
  font-family: var(--tx-sans);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5 {
  font-family: var(--tx-display);
  color: var(--tx-ink);
  letter-spacing: -0.02em;
  font-weight: 700;
}
a { color: var(--tx-brand-deep); }
a:hover { color: var(--tx-ink); }
::selection { background: var(--tx-brand); color: var(--tx-ink); }

/* ---------- the top bar ---------- */
.top-bar, .top-bar-section ul li, .contain-to-grid, .top-bar.expanded .title-area {
  background: var(--tx-ink) !important;
}
.top-bar-section li:not(.has-form) a:not(.button) {
  background: transparent !important;
  color: rgba(255, 255, 255, .72) !important;
  font-family: var(--tx-sans);
  font-size: 14px;
}
.top-bar-section li:not(.has-form) a:not(.button):hover,
.top-bar-section li.active:not(.has-form) a:not(.button) {
  background: rgba(255, 255, 255, .07) !important;
  color: #fff !important;
}

/* ---------- panels become cards ---------- */
.panel {
  background: #fff;
  border: 1px solid var(--tx-line);
  border-radius: var(--tx-radius);
  box-shadow: 0 1px 2px rgba(11, 15, 20, .04), 0 14px 30px -22px rgba(11, 15, 20, .25);
  padding: 28px;
}
.panel > h4:first-child, .panel > .row:first-child h4 {
  margin-top: 0;
  font-size: 22px;
}

/* ---------- form controls ---------- */
label {
  color: var(--tx-mut);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .01em;
}
input[type="text"], input[type="password"], input[type="email"], input[type="tel"],
input[type="url"], input[type="number"], input[type="search"], textarea, select {
  border: 1px solid var(--tx-line) !important;
  border-radius: 8px !important;
  box-shadow: none !important;
  background: #fff !important;
  color: var(--tx-ink) !important;
  font-family: var(--tx-sans) !important;
  font-size: 15px !important;
  padding: 10px 12px !important;
  height: auto !important;
  transition: border-color .14s, box-shadow .14s;
}
input[type="text"]:focus, input[type="password"]:focus, input[type="email"]:focus,
input[type="tel"]:focus, input[type="url"]:focus, input[type="number"]:focus,
input[type="search"]:focus, textarea:focus, select:focus {
  border-color: var(--tx-brand-deep) !important;
  box-shadow: 0 0 0 3px var(--tx-brand-wash) !important;
  outline: none;
}
::placeholder { color: var(--tx-faint); }

/* ---------- buttons ---------- */
.button, button, input[type="submit"] {
  border-radius: 8px !important;
  font-family: var(--tx-sans) !important;
  font-weight: 600 !important;
  font-size: 14.5px !important;
  padding: 11px 20px !important;
  border: 0 !important;
  transition: background .14s, transform .14s;
}
.button:hover, button:hover, input[type="submit"]:hover { transform: translateY(-1px); }
.button.success, input[type="submit"].success, button.success,
.button:not(.alert):not(.secondary):not(.warning):not(.info),
input[type="submit"]:not(.alert):not(.secondary):not(.warning):not(.info) {
  background: var(--tx-brand) !important;
  color: var(--tx-ink) !important;
}
.button.success:hover, input[type="submit"].success:hover { background: var(--tx-brand-deep) !important; color: #fff !important; }
.button.secondary { background: var(--tx-warm) !important; color: var(--tx-ink) !important; }
.button.alert, input[type="submit"].alert { background: var(--tx-danger) !important; color: #fff !important; }

/* ---------- alerts ---------- */
.alert-box {
  border: 1px solid var(--tx-line);
  border-radius: 8px;
  background: var(--tx-warm);
  color: var(--tx-ink-2);
  font-size: 14px;
  padding: 12px 14px;
}
.alert-box.success { background: var(--tx-brand-wash); border-color: #BFEBB9; color: #1E6B27; }
.alert-box.alert { background: #FDEDED; border-color: #F5C6C6; color: #8C2B2B; }

/* ---------- tables, which is where the message lists live ---------- */
table { border: 1px solid var(--tx-line); border-radius: var(--tx-radius); border-collapse: separate; border-spacing: 0; overflow: hidden; }
table thead { background: var(--tx-warm); }
table thead th {
  font-family: var(--tx-mono); font-size: 11px; text-transform: uppercase;
  letter-spacing: .07em; color: var(--tx-mut); font-weight: 500;
}
table tr:nth-of-type(even) { background: var(--tx-paper); }
table tbody tr:hover { background: var(--tx-brand-wash); }
table td, table th { border-bottom: 1px solid var(--tx-line); }
table tbody tr:last-child td { border-bottom: 0; }

/* ---------- footer ---------- */
footer, .footer { background: var(--tx-ink) !important; color: rgba(255,255,255,.6); border-top: 0 !important; }
footer a, .footer a { color: rgba(255,255,255,.75) !important; }
footer a:hover, .footer a:hover { color: var(--tx-brand) !important; }

/* Keyboard focus must stay visible even where Foundation removed it. */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--tx-brand-deep); outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
