/*
  Onsite Fitness homepage service form
  Restored to match the existing onsitefitness.net design.
*/

.osf-request {
  --osf-navy: #05294f;
  --osf-blue: #0b63b6;
  --osf-blue-bright: #1590e8;
  --osf-white: #ffffff;
  --osf-border: #d9e6f2;
  --osf-text: #1c2d3d;
  --osf-muted: #5f7285;
  --osf-success-bg: #e9f8ee;
  --osf-success-text: #155724;
  --osf-success-border: #bce5c8;
  --osf-error-bg: #fdecec;
  --osf-error-text: #842029;
  --osf-error-border: #f5c2c7;

  width: 100%;
  max-width: none;
  margin: 0;
  padding: 22px;
  color: var(--osf-text);
  background: var(--osf-white);
  border: 0;
  border-top: 5px solid var(--osf-blue-bright);
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(5, 41, 79, 0.14);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.5;
}

.osf-request,
.osf-request * {
  box-sizing: border-box;
}

.osf-request h2,
.osf-request__header h2 {
  margin: 0 0 6px;
  color: var(--osf-navy);
  font-size: 24px;
  line-height: 1.15;
  text-transform: none;
  letter-spacing: normal;
}

.osf-request__header {
  margin: 0;
}

.osf-request__header > p {
  margin: 0 0 15px;
  color: var(--osf-muted);
  font-size: 14px;
}

/* The replacement no longer uses the red eyebrow, but hide it if an older
   copy of form-snippet.html is still on the page. */
.osf-eyebrow {
  display: none !important;
}

.osf-form {
  position: relative;
  display: grid;
  gap: 10px;
}

.osf-grid,
.osf-grid--2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* Neutralize the larger spacing from the first rebuild. */
.osf-grid + .osf-grid,
.osf-grid + .osf-field,
.osf-field + .osf-field {
  margin-top: 0;
}

.osf-field label {
  display: block;
  margin: 0 0 4px;
  color: var(--osf-navy);
  font-size: 12px;
  font-weight: 900;
}

.osf-field input,
.osf-field select,
.osf-field textarea {
  width: 100%;
  min-height: 0;
  margin: 0;
  padding: 10px 11px;
  color: var(--osf-text);
  background: #fbfdff;
  border: 1px solid var(--osf-border);
  border-radius: 7px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  line-height: normal;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.osf-field select {
  height: 39px;
}

.osf-field textarea {
  min-height: 78px;
  resize: vertical;
}

.osf-field input:focus,
.osf-field select:focus,
.osf-field textarea:focus {
  outline: none;
  border-color: var(--osf-blue-bright);
  box-shadow: 0 0 0 3px rgba(21, 144, 232, 0.12);
}

.osf-help {
  margin: 5px 0 0;
  color: var(--osf-muted);
  font-size: 12px;
  line-height: 1.4;
}

/* Honeypot: hidden from visitors, available to basic spam bots. */
.osf-hp,
.hidden-field {
  position: absolute !important;
  left: -9999px !important;
  top: auto !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.form-message,
.osf-status {
  display: none;
  min-height: 0;
  margin: 0;
  padding: 11px 12px;
  border-radius: 7px;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.4;
}

.form-message.success,
.osf-status--success {
  display: block;
  color: var(--osf-success-text);
  background: var(--osf-success-bg);
  border: 1px solid var(--osf-success-border);
}

.form-message.error,
.osf-status--error {
  display: block;
  color: var(--osf-error-text);
  background: var(--osf-error-bg);
  border: 1px solid var(--osf-error-border);
}

.osf-submit,
.osf-request .btn,
.osf-request .btn-blue {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  min-height: 0;
  margin: 0;
  padding: 12px 18px;
  color: var(--osf-white);
  background: var(--osf-blue-bright);
  border: 0;
  border-radius: 7px;
  box-shadow: none;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  font-weight: 900;
  line-height: normal;
  letter-spacing: 0.2px;
  text-align: center;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s ease;
}

.osf-submit:hover,
.osf-request .btn-blue:hover {
  background: var(--osf-blue);
  transform: none;
}

.osf-submit:focus-visible {
  outline: 3px solid rgba(21, 144, 232, 0.3);
  outline-offset: 2px;
}

.osf-submit:disabled {
  cursor: wait;
  opacity: 0.72;
  transform: none;
}

.osf-submit__spinner {
  display: none;
  width: 15px;
  height: 15px;
  border: 2px solid rgba(255, 255, 255, 0.42);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: osf-spin 0.7s linear infinite;
}

.osf-form[aria-busy="true"] .osf-submit__spinner {
  display: inline-block;
}

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

/* Google inserts the reCAPTCHA v3 badge. Do not hide .grecaptcha-badge. */

@media (max-width: 680px) {
  .osf-request {
    padding: 20px;
  }

  .osf-grid,
  .osf-grid--2 {
    grid-template-columns: 1fr;
  }
}
