/* Connect With Us (first named Partner / Donate / Take Help): floating glass button and form. Shared by the ARTICLE 300A and Record Room
   websites. Colours are Record Room's palette, some with transparency for the glass. */

.help-button {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 30;
  overflow: hidden;
  padding: 13px 24px;
  border-radius: 999px;
  border: 1px solid rgba(122, 90, 58, 0.35);
  background: rgba(251, 251, 248, 0.6);
  -webkit-backdrop-filter: blur(12px) saturate(1.3);
  backdrop-filter: blur(12px) saturate(1.3);
  box-shadow: 0 6px 24px rgba(24, 23, 15, 0.12);
  color: #4B3422;
  font: 800 15px/1.2 var(--font, system-ui, sans-serif);
  letter-spacing: 0.01em;
  white-space: nowrap;
  cursor: pointer;
}

.help-button[hidden] { display: none; }
.help-button:hover { background: rgba(251, 251, 248, 0.8); }
.help-button:focus-visible { outline: 3px solid #E87524; outline-offset: 3px; }

/* The "very slight" glass animation: a soft band of light crossing the button every few seconds. */
.help-button::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(110deg, rgba(251, 251, 248, 0) 30%, rgba(251, 251, 248, 0.7) 50%, rgba(251, 251, 248, 0) 70%);
  transform: translateX(-120%);
  animation: help-button-sheen 7s ease-in-out 2s infinite;
}

@keyframes help-button-sheen {
  0%, 75% { transform: translateX(-120%); }
  100% { transform: translateX(120%); }
}

@media (prefers-reduced-motion: reduce) {
  .help-button::after { animation: none; display: none; }
}

@media (prefers-color-scheme: dark) {
  .help-button { background: rgba(24, 23, 15, 0.6); border-color: rgba(217, 180, 143, 0.35); color: #E8CFB3; }
  .help-button:hover { background: rgba(24, 23, 15, 0.8); }
}

/* Keep the page's last lines clear of the floating button. */
body { padding-bottom: 84px; }

@media print {
  .help-button, .help-dialog { display: none; }
}

/* The form */
.help-dialog {
  width: min(480px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow: auto; /* long form on small phones scrolls inside the dialog, so Send stays reachable */
  padding: 0;
  border: 1px solid #7A5A3A;
  border-radius: 18px;
  background: #FBFBF8;
  color: #18170F;
}

.help-dialog::backdrop { background: rgba(24, 23, 15, 0.45); }

.help-form { display: grid; gap: 12px; padding: 22px 22px 20px; font: 400 15px/1.4 var(--font, system-ui, sans-serif); }
.help-form h2 { margin: 0; font-size: 20px; font-weight: 900; }
/* Title bar: stays at the top of the dialog while the form scrolls, so the close icon is always reachable. */
.help-head {
  position: sticky; top: 0; z-index: 2;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin: -22px -22px 0; padding: 16px 16px 12px 22px;
  background: #FBFBF8; border-bottom: 1px solid #7A5A3A;
}
.help-x {
  flex: none; display: grid; place-items: center; width: 40px; height: 40px;
  border: 1.5px solid #7A5A3A; border-radius: 999px; background: #FBFBF8; color: #4B3422; cursor: pointer;
}
.help-x:hover { background: #F3F1EA; }
.help-x:focus-visible { outline: 3px solid #E87524; outline-offset: 2px; }
.help-form label { display: grid; gap: 4px; font-weight: 700; font-size: 14px; color: #4B3422; }
.help-form .help-optional { font-weight: 500; color: #6A6053; }

.help-form input,
.help-form select,
.help-form textarea {
  font: inherit;
  color: #18170F;
  background: #FBFBF8;
  border: 1.5px solid #6A6053;
  border-radius: 10px;
  padding: 9px 11px;
}

.help-form textarea { min-height: 96px; resize: vertical; }
.help-form [aria-invalid="true"] { border-color: #E87524; }
.help-form input:focus-visible,
.help-form select:focus-visible,
.help-form textarea:focus-visible { outline: 3px solid #E87524; outline-offset: 1px; }

.help-error { margin: 0; min-height: 0; font-size: 13px; font-weight: 600; color: #4B3422; }
.help-error:empty { display: none; }
.help-status { margin: 0; min-height: 1.4em; font-weight: 700; color: #4B3422; }

.help-actions { display: flex; gap: 10px; justify-content: flex-end; }
.help-actions button { font: 800 15px var(--font, system-ui, sans-serif); padding: 10px 18px; border-radius: 999px; cursor: pointer; }
.help-form button[type="submit"] { background: #7A5A3A; color: #FBFBF8; border: 1.5px solid #7A5A3A; }
.help-form button[type="submit"]:disabled { cursor: progress; background: #6A6053; border-color: #6A6053; }
.help-close { background: #FBFBF8; color: #4B3422; border: 1.5px solid #7A5A3A; }

/* Purpose and language toggles: radio buttons drawn as a row of joined pill buttons. */
.help-choice { margin: 0; padding: 0; border: 0; min-width: 0; }
.help-choice legend { padding: 0; margin-bottom: 6px; font-weight: 700; font-size: 14px; color: #4B3422; }
.help-toggle { display: flex; border: 1.5px solid #7A5A3A; border-radius: 999px; overflow: hidden; }
.help-toggle label { flex: 1 1 0; display: block; position: relative; gap: 0; }
.help-toggle label + label { border-left: 1.5px solid #7A5A3A; }
.help-toggle input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.help-toggle span { display: block; padding: 10px 8px; text-align: center; font-weight: 800; color: #4B3422; background: #FBFBF8; }
.help-toggle input:checked + span { background: #7A5A3A; color: #FBFBF8; }
.help-toggle input:focus-visible + span { outline: 3px solid #E87524; outline-offset: -3px; }
.help-choice[aria-invalid="true"] .help-toggle { border-color: #E87524; }
.help-part { display: grid; gap: 12px; }
.help-part[hidden] { display: none; }
.help-form select:disabled { opacity: 0.6; }
.help-places-status { margin: 0; font-size: 13px; font-weight: 600; color: #4B3422; }
.help-places-status:empty { display: none; }

/* Spam trap: kept off screen, never shown to people. */
.help-trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

@media (prefers-color-scheme: dark) {
  .help-dialog { background: #18170F; color: #F3F1EA; border-color: #D9B48F; }
  .help-form label, .help-status, .help-error { color: #E8CFB3; }
  .help-form .help-optional { color: #BDB4A6; }
  .help-form input, .help-form select, .help-form textarea { background: #18170F; color: #F3F1EA; border-color: #BDB4A6; }
  .help-close { background: #18170F; color: #E8CFB3; border-color: #D9B48F; }
  .help-head { background: #18170F; border-bottom-color: #D9B48F; }
  .help-x { background: #18170F; color: #E8CFB3; border-color: #D9B48F; }
  .help-x:hover { background: #211F17; }
}

@media (prefers-color-scheme: dark) {
  .help-form button[type="submit"] { background: #D9B48F; border-color: #D9B48F; color: #18170F; }
  .help-form button[type="submit"]:disabled { background: #BDB4A6; border-color: #BDB4A6; }
}

@media (prefers-color-scheme: dark) {
  .help-choice legend, .help-places-status { color: #E8CFB3; }
  .help-toggle, .help-toggle label + label { border-color: #D9B48F; }
  .help-toggle span { background: #18170F; color: #E8CFB3; }
  .help-toggle input:checked + span { background: #D9B48F; color: #18170F; }
}

/* Drop-down lists in the brand colours instead of the system blue (Sandeep, 2026-11-16). Uses customisable select
   (Chrome 135 and later); other browsers keep their own list colours. */
@supports (appearance: base-select) {
  .help-form select,
  .help-form select::picker(select) { appearance: base-select; }
  .help-form select { display: flex; align-items: center; justify-content: space-between; }
  .help-form select::picker-icon { color: #7A5A3A; }
  .help-form select::picker(select) {
    margin-top: 4px; padding: 4px; max-height: 50vh;
    border: 1.5px solid #7A5A3A; border-radius: 10px; background: #FBFBF8;
    box-sizing: border-box;
  }
  .help-form select option { padding: 8px 10px; border-radius: 6px; color: #18170F; background: #FBFBF8; }
  .help-form select option:hover,
  .help-form select option:focus-visible { background: #F3F1EA; outline: none; }
  .help-form select option:checked { background: #7A5A3A; color: #FBFBF8; }
  .help-form select option::checkmark { color: currentColor; }
}

@media (prefers-color-scheme: dark) {
  @supports (appearance: base-select) {
    .help-form select::picker-icon { color: #D9B48F; }
    .help-form select::picker(select) { background: #18170F; border-color: #D9B48F; }
    .help-form select option { color: #F3F1EA; background: #18170F; }
    .help-form select option:hover,
    .help-form select option:focus-visible { background: #211F17; }
    .help-form select option:checked { background: #D9B48F; color: #18170F; }
  }
}

