/* ============================================================
   Equitable Futures — forms.css
   Rousto Forms public styling (theme-owned; the plugin renders
   bare, semantic markup). Blue/white double frame with Tajik
   geometric rhombus accents, echoing the home slider.
   ============================================================ */

/* ── Form shell ── */
.rousto-forms {
  position: relative;
  max-width: 640px;
  width: 100%;
  padding: clamp(24px, 4vw, 40px);
  background: var(--c-surface);
  border: 2px solid var(--ef-blue);
  /* outer blue → inner white double frame */
  box-shadow:
    0 0 0 3px #fff,
    0 0 0 5px var(--ef-blue),
    0 10px 30px rgba(23, 58, 105, 0.12);
}

/* ── Notices ── */
.rousto-forms__notice,
.rousto-forms__success,
.rousto-forms__error,
.rousto-forms__offline,
.rousto-forms__warning {
  margin-bottom: 24px;
  padding: 12px 16px;
  border-left: 4px solid;
  font-size: 14px;
  line-height: 1.5;
}

.rousto-forms__notice,
.rousto-forms__offline {
  background: var(--ef-tint);
  border-color: var(--ef-blue);
  color: var(--ef-ink);
}

.rousto-forms__success {
  background: #eef7ee;
  border-color: var(--c-green);
  color: #1c5310;
}

.rousto-forms__error {
  background: #fdf0ee;
  border-color: var(--coral);
  color: #8c2b20;
}

.rousto-forms__warning {
  background: #fdf6e8;
  border-color: var(--ef-gold);
  color: #6b4d12;
}

/* ── Fields ── */
.rousto-forms__field {
  margin-bottom: 22px;
}

.rousto-forms__label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-weight: 700;
  font-size: 14px;
  color: var(--ef-ink);
}

/* rhombus bullet on standard field labels */
.rousto-forms__label:not(.rousto-forms__label--checkbox):not(.rousto-forms__label--radio)::before {
  content: "";
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  background: var(--ef-blue);
  transform: rotate(45deg);
}

.rousto-forms__req {
  color: var(--ef-blue);
  font-weight: 800;
}

.rousto-forms__input {
  width: 100%;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.4;
  color: var(--ef-ink);
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: 6px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

textarea.rousto-forms__input {
  min-height: 140px;
  resize: vertical;
}

select.rousto-forms__input {
  appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%231f4e8c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 12px;
}

.rousto-forms__input::placeholder {
  color: var(--c-text-3);
}

.rousto-forms__input:focus {
  outline: none;
  border-color: var(--ef-blue);
  box-shadow: 0 0 0 3px rgba(31, 78, 140, 0.16);
}
.rousto-forms__input:focus-visible {
  outline: 3px solid var(--ef-blue);
  outline-offset: 2px;
}

/* ── Checkbox & radio ── */
.rousto-forms__label--checkbox,
.rousto-forms__label--radio {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  font-weight: 500;
  font-size: 14px;
  line-height: 1.45;
  color: var(--ef-ink);
  cursor: pointer;
}

.rousto-forms__label--radio + .rousto-forms__label--radio {
  margin-top: 8px;
}

.rousto-forms__label--checkbox .rousto-forms__input,
.rousto-forms__label--radio .rousto-forms__input {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin: 1px 0 0;
  accent-color: var(--ef-blue);
}

/* the GDPR consent stands out as a highlighted box */
.rousto-forms__field--consent {
  padding: 14px 16px;
  background: var(--ef-tint);
  border: 1px solid var(--c-border);
  border-radius: 6px;
}

/* ── Submit ── */
.rousto-forms__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 30px;
  background: var(--ef-blue);
  border: 0;
  border-radius: 6px;
  font-family: inherit;
  font-weight: 700;
  font-size: 15px;
  line-height: 1;
  color: #fff;
  cursor: pointer;
  transition: background 0.2s;
}
.rousto-forms__submit:hover { background: var(--ef-blue-dark); }
.rousto-forms__submit:focus-visible { outline: 3px solid var(--ef-blue); outline-offset: 3px; }
.rousto-forms__submit:disabled { opacity: 0.7; cursor: default; }

/* ── Captcha (antispam level 2) ── */
.rousto-forms .cf-turnstile,
.rousto-forms .h-captcha {
  margin-bottom: 22px;
}

/* ── Inline validation errors (added by forms.js) ── */
.rousto-forms__field--error .rousto-forms__input {
  border-color: var(--coral);
  box-shadow: 0 0 0 3px rgba(250, 90, 74, 0.15);
}
.rousto-forms__field-error {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  color: #8c2b20;
}

/* ── Responsive ── */
@media (max-width: 600px) {
  .rousto-forms { padding: 20px; }
  .rousto-forms__submit { width: 100%; }
}
