/* ==========================================================================
   Telling us something has changed

   A short form on a quiet page. Nothing competes with the message box.
   ========================================================================== */

.rep {
  --rp-purple: #7f3f98;
  --rp-ink:    #2b2530;
  --rp-soft:   #6d6577;
  --rp-line:   #e7e2ec;
  --rp-sand:   #faf7f2;

  padding: 26px 16px 72px;
  background: var(--rp-sand);
  color: var(--rp-ink);
  font-family: "Open Sans", -apple-system, BlinkMacSystemFont, sans-serif;
}

.rep-inner { width: 100%; max-width: 640px; margin: 0 auto; }

/* ----------------------------------------------------------------- head -- */

.rep-head { margin-bottom: 22px; }

.rep-head h1 {
  margin: 0;
  padding: 0;                      /* custom.min.css puts 1.2em on section h1 */
  font-family: "Amatic SC", cursive;
  font-size: clamp(2.8rem, 7vw, 4.2rem);
  font-weight: 700;
  line-height: .9;
  color: var(--rp-purple);
}
.rep-head p { margin: 10px 0 0; font-size: 1rem; line-height: 1.65; color: var(--rp-soft); }
.rep-head strong { color: var(--rp-ink); }

.rep-flash {
  margin: 0 0 18px;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: .9375rem;
  font-weight: 700;
  line-height: 1.5;
}
.rep-flash.is-ok    { background: #e7f4ec; color: #1d6b3f; }
.rep-flash.is-error { background: #fbeceb; color: #97302a; }

/* ----------------------------------------------------------------- form -- */

.rep-form {
  padding: 22px;
  border: 1px solid var(--rp-line);
  border-radius: 16px;
  background: #fff;
}

/* Off-screen rather than display:none -- some form fillers know to skip a
   hidden field, fewer bother checking where it sits. */
.rep-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.rep-kinds { margin: 0 0 20px; padding: 0; border: 0; }

.rep-kinds legend,
.rep-field label {
  display: block;
  margin-bottom: 8px;
  padding: 0;
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--rp-soft);
}
.rep-field label span { text-transform: none; letter-spacing: 0; font-weight: 600; }

.rep-kind {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  margin-bottom: 6px;
  border: 1px solid var(--rp-line);
  border-radius: 10px;
  font-size: .9375rem;
  cursor: pointer;
}
.rep-kind:hover { border-color: var(--rp-purple); }
.rep-kind input { margin: 0; cursor: pointer; }

/* The chosen one is coloured, so which is selected reads without going down
   the list checking radio buttons. :has is not everywhere yet -- where it is
   missing the radio still says which, so nothing is lost. */
.rep-kind:has(input:checked) {
  border-color: var(--rp-purple);
  background: #f7f2fa;
  font-weight: 700;
}

.rep-field { margin-bottom: 20px; }

.rep-field textarea,
.rep-field input[type="email"] {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--rp-line);
  border-radius: 10px;
  background: #fff;
  color: var(--rp-ink);
  font-family: inherit;
  font-size: .9375rem;
  line-height: 1.6;
}
.rep-field textarea { resize: vertical; min-height: 120px; }
.rep-field textarea::placeholder,
.rep-field input::placeholder { color: var(--rp-soft); opacity: .7; }
.rep-field textarea:focus,
.rep-field input:focus { outline: 2px solid var(--rp-purple); outline-offset: 1px; }

.rep-hint { margin: 6px 0 0; font-size: .8125rem; line-height: 1.5; color: var(--rp-soft); }

/* -------------------------------------------------------------- actions -- */

.rep-actions { display: flex; align-items: center; gap: 16px; }

.rep-send {
  padding: 12px 30px;
  border: 0;
  border-radius: 999px;
  background: var(--rp-purple);
  color: #fff;
  font-family: inherit;
  font-size: .9375rem;
  font-weight: 700;
  cursor: pointer;
}
.rep-send:hover { background: #6d3583; }
.rep-send:focus-visible { outline: 2px solid var(--rp-ink); outline-offset: 2px; }

.rep-back { font-size: .875rem; font-weight: 700; color: var(--rp-soft); }
.rep-back:hover { color: var(--rp-purple); }

@media (max-width: 520px) {
  .rep { padding: 18px 12px 52px; }
  .rep-form { padding: 16px; }
}

/* ==========================================================================
   The inbox
   ========================================================================== */

.rep-inner--wide { max-width: 860px; }

.rep-tabs { display: flex; gap: 8px; margin-bottom: 18px; }

.rep-tabs a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border: 1px solid var(--rp-line);
  border-radius: 999px;
  background: #fff;
  color: var(--rp-soft);
  font-size: .875rem;
  font-weight: 700;
  text-decoration: none;
}
.rep-tabs a:hover { border-color: var(--rp-purple); color: var(--rp-purple); }
.rep-tabs a.is-on {
  background: var(--rp-purple);
  border-color: var(--rp-purple);
  color: #fff;
}
.rep-tabs span { font-size: .75rem; opacity: .7; }

.rep-empty { color: var(--rp-soft); font-size: .9375rem; }

.rep-list { margin: 0; padding: 0; list-style: none; }

.rep-item {
  padding: 18px 20px;
  margin-bottom: 12px;
  border: 1px solid var(--rp-line);
  border-radius: 14px;
  background: #fff;
}

.rep-item-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.rep-kind-tag {
  display: inline-block;
  padding: 4px 11px;
  border-radius: 999px;
  background: #f3eff7;
  color: var(--rp-purple);
  font-size: .75rem;
  font-weight: 700;
}

.rep-item-head time {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--rp-soft);
}

.rep-item-about { margin: 10px 0 0; font-size: .8125rem; color: var(--rp-soft); }
.rep-item-about strong { color: var(--rp-ink); }
.rep-item-about a { color: var(--rp-purple); font-weight: 700; }

.rep-item-body {
  margin: 10px 0 0;
  font-size: .9375rem;
  line-height: 1.65;
  color: var(--rp-ink);
}

.rep-item-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--rp-line);
}

.rep-reply { font-size: .8125rem; font-weight: 700; color: var(--rp-purple); }
.rep-noreply { font-size: .8125rem; color: var(--rp-soft); }

.rep-item-foot form { margin: 0; }

.rep-mark {
  padding: 7px 16px;
  border: 1px solid var(--rp-line);
  border-radius: 999px;
  background: #fff;
  color: var(--rp-ink);
  font-family: inherit;
  font-size: .8125rem;
  font-weight: 700;
  cursor: pointer;
}
.rep-mark:hover { border-color: var(--rp-purple); color: var(--rp-purple); }
