.newsletter-form--compact {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  min-width: 0;
}

.newsletter-form--compact input[type="email"] {
  width: 100%;
  min-width: 0;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: var(--text-xs);
}

.newsletter-form--compact .btn-submit {
  width: 100%;
}

.newsletter-form--compact .form-status,
.newsletter-form--compact .form-note {
  width: 100%;
  min-width: 0;
}

.newsletter-form--dark .form-status,
.newsletter-form--dark .form-note {
  color: rgba(255, 255, 255, 0.8);
}

.turnstile-wrap {
  display: flex;
  justify-content: flex-start;
  flex: 0 1 300px;
  grid-column: 1 / -1;
  inline-size: 300px;
  min-height: 66px;
  max-width: 100%;
  overflow: hidden;
}

.newsletter-form--compact .turnstile-wrap {
  flex: 0 1 auto;
  justify-content: flex-start;
  inline-size: min(100%, 320px);
  max-inline-size: 100%;
  min-height: 74px;
  transform-origin: top left;
  overflow: hidden;
}

.newsletter-form--compact .cf-turnstile {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.newsletter-form--compact .cf-turnstile iframe {
  width: 100% !important;
}

.contact-form .turnstile-wrap {
  inline-size: 100%;
}

.newsletter-strip .turnstile-wrap,
.newsletter-strip .form-status {
  justify-self: start;
}

.cf-turnstile,
.cf-turnstile iframe {
  max-width: 100% !important;
}

.form-note,
.form-status {
  font-size: var(--text-xs);
  margin-top: var(--space-2);
  color: var(--color-text-muted);
  min-height: 1.25rem;
}

.form-status:empty,
.newsletter-strip .form-status:empty {
  min-height: 0;
  margin-top: 0;
}

.contact-form {
  max-width: 560px;
}

.form-group {
  margin-bottom: var(--space-5);
}

.form-group label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  margin-bottom: var(--space-2);
  color: var(--color-text);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--color-surface-2);
  color: var(--color-text);
  font-size: var(--text-sm);
  font-family: var(--font-body);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--color-accent);
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in oklch, var(--color-accent), transparent 80%);
}

.form-group textarea {
  min-height: 140px;
  resize: vertical;
  line-height: 1.6;
}

.form-status[data-state="success"] {
  color: var(--color-success);
}

.form-status[data-state="error"] {
  color: var(--color-error);
}

.newsletter-strip .form-status {
  grid-column: 1 / -1;
  align-self: center;
  margin-top: 0;
  opacity: 1;
}

.newsletter-strip .form-status[data-state] {
  border-radius: var(--radius-full);
  padding: var(--space-2) var(--space-4);
  font-weight: 700;
  line-height: 1.3;
}

.newsletter-strip .form-status[data-state="error"] {
  background: rgba(255, 255, 255, 0.92);
  color: var(--color-error);
}

button[type="submit"][data-state="success"] {
  background: var(--color-success);
  border-color: var(--color-success);
  color: #fff;
  cursor: default;
  opacity: 1;
  box-shadow: 0 4px 16px color-mix(in oklch, var(--color-success), transparent 72%);
}

button[type="submit"][data-state="success"]:hover {
  background: var(--color-success);
  border-color: var(--color-success);
  transform: none;
  box-shadow: 0 4px 16px color-mix(in oklch, var(--color-success), transparent 72%);
}

.form-loading .btn-submit,
.form-loading button[type="submit"] {
  opacity: 0.8;
  pointer-events: none;
}

@media (max-width: 768px) {
  .newsletter-strip .turnstile-wrap,
  .newsletter-strip .form-status {
    justify-self: center;
  }
}
