/**
 * Overwatch Forms — Revolution PTS Dark Theme Overrides
 *
 * Overrides the default Overwatch Forms CSS variables and adds
 * RPTS-specific styling for the dark navy theme.
 */

/* ── Global variable overrides ─────────────────────────────── */
.ow-form {
  --ow-font: 'Inter', -apple-system, sans-serif;
  --ow-text: #F1F5F9;
  --ow-label-size: 0.8125rem;
  --ow-label-weight: 500;
  --ow-border: #1E293B;
  --ow-border-focus: #E84C30;
  --ow-radius: 8px;
  --ow-spacing: 1rem;
  --ow-btn-bg: #E84C30;
  --ow-btn-color: #fff;
  --ow-btn-padding: 0.875rem 2rem;
  --ow-btn-radius: 100px;
  --ow-error: #EF4444;
  --ow-success: #22C55E;
}

/* ── Labels ────────────────────────────────────────────────── */
.ow-form label {
  color: #CBD5E1;
  letter-spacing: 0.01em;
}
.ow-form .ow-required {
  color: #E84C30;
}
.ow-form .ow-field-desc {
  color: #5E7184;
  font-size: 0.75rem;
}

/* ── Inputs, selects, textareas ────────────────────────────── */
.ow-form input[type="text"],
.ow-form input[type="email"],
.ow-form input[type="tel"],
.ow-form input[type="number"],
.ow-form input[type="date"],
.ow-form select,
.ow-form textarea {
  background: #111E2A;
  color: #F1F5F9;
  border: 1px solid #1E293B;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-size: 0.9375rem;
  font-family: 'Inter', sans-serif;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.ow-form input::placeholder,
.ow-form textarea::placeholder {
  color: #5E7184;
}
.ow-form input:focus,
.ow-form select:focus,
.ow-form textarea:focus {
  border-color: #E84C30;
  box-shadow: 0 0 0 3px rgba(232, 76, 48, 0.15);
  outline: none;
}
.ow-form select option {
  background: #111E2A;
  color: #F1F5F9;
}

/* ── Checkbox & radio ──────────────────────────────────────── */
.ow-form .ow-choices {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}
.ow-form .ow-choice {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: #111E2A;
  border: 1px solid #1E293B;
  border-radius: 8px;
  color: #CBD5E1;
  font-size: 0.875rem;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.ow-form .ow-choice:hover {
  border-color: #E84C30;
  background: rgba(232, 76, 48, 0.05);
}
.ow-form .ow-choice input:checked + span,
.ow-form .ow-choice:has(input:checked) {
  color: #F1F5F9;
  border-color: #E84C30;
  background: rgba(232, 76, 48, 0.1);
}
.ow-form input[type="checkbox"],
.ow-form input[type="radio"] {
  accent-color: #E84C30;
}

/* ── Consent ───────────────────────────────────────────────── */
.ow-form .ow-consent {
  padding: 0.75rem 0;
  border-top: 1px solid #1E293B;
}
.ow-form .ow-consent-text {
  color: #94A3B8;
  font-size: 0.8125rem;
  line-height: 1.5;
}

/* ── Submit button ─────────────────────────────────────────── */
.ow-form .ow-submit {
  width: 100%;
  background: #E84C30;
  color: #fff;
  border: none;
  border-radius: 100px;
  padding: 0.875rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
}
.ow-form .ow-submit:hover {
  background: #F05A40;
  transform: translateY(-1px);
}
.ow-form .ow-submit:active {
  transform: translateY(0);
}

/* ── Success/error messages ────────────────────────────────── */
.ow-form .ow-form-message--success {
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.3);
  color: #4ADE80;
  border-radius: 8px;
}
.ow-form .ow-form-message--error {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
  color: #FCA5A5;
  border-radius: 8px;
}

/* ── Field error state ─────────────────────────────────────── */
.ow-form .ow-field--error input,
.ow-form .ow-field--error select,
.ow-form .ow-field--error textarea {
  border-color: #EF4444;
}
.ow-form .ow-field-error {
  color: #FCA5A5;
  font-size: 0.75rem;
}

/* ── Name field 2-column grid ──────────────────────────────── */
.ow-form .ow-name-fields {
  gap: 0.75rem;
}
.ow-form .ow-name-fields label {
  font-size: 0.75rem;
  color: #94A3B8;
}

/* ── Section breaks ────────────────────────────────────────── */
.ow-form .ow-section-hr {
  border-color: #1E293B;
}
.ow-form .ow-section-title {
  color: #F1F5F9;
  font-family: 'Acumin Variable', 'Inter', sans-serif;
}

/* ── Modal context — slightly tighter spacing ──────────────── */
.booking-modal .ow-form,
.enquiry-modal .ow-form {
  --ow-spacing: 0.875rem;
}

/* ── Hero context — form sits in split layout ──────────────── */
.landing-hero__form-wrap .ow-form,
.loc-hero__form-wrap .ow-form {
  --ow-spacing: 0.875rem;
}

/* ── Popup context — minimal form ──────────────────────────── */
.rpts-form--popup {
  --ow-spacing: 0.75rem;
}

/* ── Privacy disclaimer (added below forms in templates) ───── */
.rpts-form-privacy {
  color: #5E7184;
  font-size: 0.6875rem;
  line-height: 1.5;
  margin-top: 0.75rem;
  text-align: center;
}
.rpts-form-privacy a {
  color: #94A3B8;
  text-decoration: underline;
}
.rpts-form-privacy a:hover {
  color: #F1F5F9;
}

/* ── Popup overlay — dark theme ────────────────────────────── */
.ow-popup {
  --ow-popup-bg: #0C1620;
  --ow-popup-overlay: rgba(0, 0, 0, 0.75);
  --ow-popup-radius: 16px;
}
.ow-popup__dialog {
  border: 1px solid #1E293B;
}
.ow-popup__close {
  color: #94A3B8;
}
.ow-popup__close:hover {
  background: rgba(232, 76, 48, 0.15);
  color: #E84C30;
}
.ow-popup__header h2 {
  color: #F1F5F9;
  font-family: 'Acumin Variable', 'Inter', sans-serif;
}
.ow-popup__header p {
  color: #94A3B8;
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 600px) {
  .ow-form .ow-choices {
    grid-template-columns: 1fr;
  }
  .ow-form input,
  .ow-form select,
  .ow-form textarea {
    font-size: 16px; /* prevents iOS zoom */
  }
}
