/* ===========================================================================
   Suggestion Box — themed to Senior.stuysu.org
   Palette, type, and the navy→pink hover are taken from the Senior Caucus site.

   Fonts (ivymode + Neue Haas Grotesk) come from the site's Adobe Fonts kit:
     <link rel="stylesheet" href="https://use.typekit.net/zfd0jrc.css">
   On Senior.stuysu.org that kit is already loaded. Keep the link when using
   the widget on its own; the kit is domain-locked, so off-site it falls back
   to Georgia / system fonts (still on-theme).
   =========================================================================== */

.sbx, .sbx * { box-sizing: border-box; }

.sbx {
  --navy:        #0c2b56;
  --navy-deep:   #051e4f;
  --blush:       #f2fcff;
  --pink:        #f7b2bd;
  --rose:        #b23a55;
  --ink:         #0c2b56;
  --muted:       #5b6a86;
  --line:        rgba(12, 43, 86, .16);
  --line-soft:   rgba(12, 43, 86, .09);
  --paper:       #ffffff;
  --field:       #eaf6fc;
  --field-focus: #ffffff;
  --field-border:#c9e3ef;
  --ok:          #4f8a5b;

  --serif: "ivymode", Georgia, "Times New Roman", serif;
  --sans:  "neue-haas-grotesk-text", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  width: 100%;
  max-width: 520px;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(5, 30, 79, .04), 0 18px 40px -20px rgba(5, 30, 79, .28);
  padding: 30px 30px 26px;
  font-family: var(--sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-align: left;
}

/* ---- Header ---- */
.sbx-eyebrow {
  margin: 0 0 8px;
  font-size: .68rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase;
  color: var(--rose);
}
.sbx-title {
  margin: 0;
  font-family: var(--serif); font-weight: 300; font-size: 2rem; line-height: 1.05;
  letter-spacing: -.01em; color: var(--navy);
}
.sbx-sub { margin: 8px 0 0; max-width: 42ch; font-size: .9rem; color: var(--muted); }

.sbx-contact { margin: 12px 0 0; font-size: .82rem; color: var(--muted); }
.sbx-contact a { color: var(--navy); text-decoration: none; border-bottom: 1px solid var(--line); }
.sbx-contact a:hover { color: var(--rose); border-bottom-color: var(--rose); }

.sbx-rule { height: 1px; margin: 20px 0 0; background: var(--line); border: 0; }

.sbx-note { margin: 14px 0 0; font-size: .76rem; color: var(--muted); }
.sbx-req { color: var(--rose); }

/* ---- Fields ---- */
.sbx-field { margin-top: 20px; }
.sbx-label, .sbx-legend {
  display: block; padding: 0; margin-bottom: 8px;
  font-family: var(--serif); font-weight: 400; font-size: 1.02rem;
  letter-spacing: -.005em; color: var(--navy);
}
.sbx-help { margin: -2px 0 10px; font-size: .82rem; color: var(--muted); }

.sbx input[type="email"], .sbx textarea {
  width: 100%; font-family: var(--sans); font-size: .92rem; color: var(--ink);
  background: var(--field); border: 1px solid var(--field-border); border-radius: 9px;
  padding: 12px 14px; transition: border-color .15s, box-shadow .15s, background .15s;
  -webkit-appearance: none; appearance: none;
}
.sbx textarea { min-height: 92px; resize: vertical; }
.sbx input[type="email"]::placeholder, .sbx textarea::placeholder { color: #bd9f9a; }
.sbx input[type="email"]:focus, .sbx textarea:focus {
  outline: none; background: var(--field-focus); border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(12, 43, 86, .13);
}

/* ---- Idea checklist ---- */
.sbx-group { border: 0; margin: 20px 0 0; padding: 0; min-width: 0; }
.sbx-opts { margin-top: 4px; border-top: 1px solid var(--line-soft); }
.sbx-opt {
  display: flex; align-items: center; gap: 13px;
  padding: 11px 6px; border-bottom: 1px solid var(--line-soft);
  cursor: pointer; transition: background .12s, padding-left .12s;
}
.sbx-opt:hover { background: rgba(247, 178, 189, .14); padding-left: 12px; }
.sbx-opt input { flex: none; width: 17px; height: 17px; accent-color: var(--navy); cursor: pointer; }
.sbx-opt span { font-size: .95rem; color: var(--navy); }

.sbx-other { display: flex; align-items: center; gap: 13px; padding: 12px 6px 2px; }
.sbx-other > input[type="checkbox"] { flex: none; width: 17px; height: 17px; accent-color: var(--navy); cursor: pointer; }
.sbx-other label { font-size: .95rem; color: var(--navy); cursor: pointer; }
.sbx-other > input[type="text"] {
  flex: 1; font-family: var(--sans); font-size: .92rem; color: var(--ink);
  background: transparent; border: 0; border-bottom: 1px solid var(--field-border); padding: 6px 2px;
}
.sbx-other > input[type="text"]:focus { outline: none; border-bottom-color: var(--navy); }

.sbx-meta { display: flex; justify-content: flex-end; margin-top: 8px; font-size: .74rem; color: var(--muted); }

/* ---- Submit ---- */
.sbx-actions { margin-top: 26px; }
.sbx-submit {
  width: 100%; font-family: var(--sans); font-size: .95rem; font-weight: 600; letter-spacing: .01em;
  cursor: pointer; color: var(--blush); background: var(--navy); border: 0;
  padding: 13px 18px; border-radius: 10px;
  transition: background .2s, color .2s, transform .06s, box-shadow .15s;
}
.sbx-submit:hover { background: var(--navy-deep); color: var(--pink); }   /* the site's hover flip */
.sbx-submit:active { transform: translateY(1px); }
.sbx-submit:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(12, 43, 86, .35); }
.sbx-submit[disabled] { opacity: .55; cursor: default; }
.sbx-submit[disabled]:hover { color: var(--blush); background: var(--navy); }

.sbx-status { margin: 12px 0 0; min-height: 1.1em; font-size: .84rem; color: var(--rose); }
.sbx-status:empty { margin: 0; min-height: 0; }

/* Honeypot */
.sbx-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---- Success ---- */
.sbx-success { display: none; text-align: center; padding: 10px 4px 4px; }
.sbx.is-sent .sbx-form { display: none; }
.sbx.is-sent .sbx-success { display: block; }
.sbx-check { width: 48px; height: 48px; margin: 0 auto 14px; color: var(--ok); }
.sbx-check circle, .sbx-check path {
  stroke-dasharray: 100; stroke-dashoffset: 100; animation: sbx-draw .55s ease forwards;
}
.sbx-check path { animation-delay: .3s; }
@keyframes sbx-draw { to { stroke-dashoffset: 0; } }
.sbx-success h3 { margin: 0 0 6px; font-family: var(--serif); font-weight: 300; font-size: 1.5rem; color: var(--navy); }
.sbx-success p { margin: 0 0 18px; font-size: .88rem; color: var(--muted); }
.sbx-again {
  font-family: var(--sans); font-size: .9rem; font-weight: 500; cursor: pointer; color: var(--navy);
  background: none; border: 1px solid var(--line); border-radius: 9px; padding: 9px 18px;
  transition: border-color .15s, background .15s, color .15s;
}
.sbx-again:hover { background: rgba(247, 178, 189, .16); border-color: var(--pink); color: var(--rose); }
.sbx-again:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(12, 43, 86, .22); }

@media (prefers-reduced-motion: reduce) {
  .sbx *, .sbx *::before, .sbx *::after { transition: none !important; animation: none !important; }
  .sbx-check circle, .sbx-check path { stroke-dashoffset: 0; }
}

@media (max-width: 540px) {
  .sbx { padding: 24px 20px 22px; border-radius: 12px; }
  .sbx-title { font-size: 1.7rem; }
}
