/* The page of a lead capture form inside the iframe of a site. It is always a light
   card, so it reads the same on a light or a dark site; the color of the form arrives
   in --fc and the text over it in --fc-on (set by frame.js). */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: transparent;
  color: #0f172a;
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --fc: #07577a;
  --fc-on: #ffffff;
}

.f-card {
  margin: 0;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #ffffff;
  padding: 24px;
  box-shadow: 0 1px 2px rgb(15 23 42 / 6%);
}

@media (max-width: 480px) {
  .f-card {
    padding: 18px 16px;
    border-radius: 12px;
  }
}

.f-logo {
  display: block;
  max-width: 180px;
  max-height: 56px;
  margin: 0 0 14px;
  object-fit: contain;
}

.f-title {
  margin: 0 0 6px;
  font-size: 1.3rem;
  line-height: 1.3;
  font-weight: 700;
  color: #0f172a;
}

.f-desc {
  margin: 0 0 16px;
  color: #475569;
  white-space: pre-line;
}

.f-form {
  display: grid;
  gap: 14px;
}

.f-form[hidden],
.f-success[hidden] {
  display: none;
}

.f-field {
  margin: 0;
  min-width: 0;
  border: 0;
  padding: 0;
}

.f-label {
  display: block;
  margin-bottom: 4px;
  padding: 0;
  font-weight: 600;
  font-size: 0.92rem;
  color: #1e293b;
}

.f-req {
  color: #b91c1c;
}

.f-input {
  display: block;
  width: 100%;
  min-height: 42px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #ffffff;
  padding: 9px 12px;
  color: #0f172a;
  font: inherit;
  font-size: 16px; /* no zoom on focus in iOS */
}

textarea.f-input {
  min-height: 96px;
  resize: vertical;
}

.f-input:focus,
.f-check input:focus-visible {
  outline: 2px solid var(--fc);
  outline-offset: 1px;
  border-color: var(--fc);
}

.f-input::placeholder {
  color: #94a3b8;
}

.f-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 4px 0;
  cursor: pointer;
}

.f-check input {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  flex: none;
  accent-color: var(--fc);
}

.f-help {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 0.85rem;
}

.f-error {
  margin: 4px 0 0;
  color: #b91c1c;
  font-size: 0.85rem;
  font-weight: 600;
}

.f-error:empty,
.f-form-error:empty {
  display: none;
}

.f-invalid .f-input {
  border-color: #dc2626;
  background: #fef2f2;
}

.f-form-error {
  margin: 0;
  border-radius: 10px;
  background: #fef2f2;
  padding: 8px 12px;
  color: #991b1b;
  font-size: 0.9rem;
}

.f-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 46px;
  border: 0;
  border-radius: 10px;
  background: var(--fc);
  padding: 10px 18px;
  color: var(--fc-on);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.f-button:hover {
  filter: brightness(1.06);
}

.f-button:focus-visible {
  outline: 3px solid #2563eb;
  outline-offset: 2px;
}

.f-button:disabled {
  cursor: progress;
  opacity: 0.8;
}

.f-spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: f-spin 0.7s linear infinite;
}

.f-busy .f-spinner {
  display: inline-block;
}

@keyframes f-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .f-spinner {
    animation: none;
  }
}

.f-required-note {
  margin: 0;
  color: #64748b;
  font-size: 0.8rem;
}

/* The trap for robots: out of sight and out of the tab order. */
.f-hp {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.f-success {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 16px 0 8px;
  text-align: center;
  color: #0f172a;
  outline: none;
}

.f-success p {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
}

.f-success-icon {
  width: 48px;
  height: 48px;
  color: var(--fc);
}

.f-refused-page {
  margin: 0;
}

.f-refused {
  margin: 0;
  border-radius: 12px;
  background: #fff7ed;
  padding: 14px 16px;
  color: #7c2d12;
  font: 14px/1.5 system-ui, sans-serif;
}
