/*
 * Olympic Forms theme - on-brand styling for every Umbraco Form rendered with the "olympic" theme
 * (Views/Partials/Forms/Themes/olympic). Loaded by that theme's Form.cshtml, so it applies to all forms,
 * whether rendered inline (the Form Block) or in the legacy inline-form page. Layered over the Umbraco Forms
 * default stylesheet, which keeps the row-fluid / col-md-* grid; this only restyles the visuals to the
 * design framework. Tokens are hard-coded (not CSS vars) so it works outside the framework CSS too.
 *
 * Opt-in field classes (set per field, e.g. by the weddings form's provisioning patch):
 *   .oly-pills      - a checkbox/radio list as selectable pills (Venue Style, Ceremony Style)
 *   .oly-check-grid - a checkbox list as a two-column grid (Wedding Extras)
 */
.olympicumb-forms-form {
  --oly-navy: #005587;
  --oly-ink: #292929;
  --oly-muted: #38658e;
  --oly-border: #c9e4f0;
  --oly-focus: #0075ae;
  --oly-sun: #ffdf5c;
  --oly-sun-hover: #fec600;
  --oly-radius: 0.5rem;
  color: var(--oly-ink);
  font-size: 1rem;
}

/* page caption + fieldset legends */
.olympicumb-forms-form .umbraco-forms-caption,
.olympicumb-forms-form > fieldset > legend {
  color: var(--oly-navy);
  font-weight: 700;
}

/* field spacing */
.olympicumb-forms-form .umbraco-forms-field { margin-bottom: 1.25rem; }

/* labels + legends */
.olympicumb-forms-form .umbraco-forms-label,
.olympicumb-forms-form .umbraco-forms-legend {
  display: block;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--oly-navy);
  margin-bottom: 0.4rem;
}

/* text inputs, selects, textareas */
.olympicumb-forms-form input[type="text"],
.olympicumb-forms-form input[type="email"],
.olympicumb-forms-form input[type="tel"],
.olympicumb-forms-form input[type="number"],
.olympicumb-forms-form input[type="password"],
.olympicumb-forms-form input[type="date"],
.olympicumb-forms-form select,
.olympicumb-forms-form textarea {
  width: 100%;
  font: inherit;
  color: var(--oly-ink);
  background-color: #fff;
  border: 1px solid var(--oly-border);
  border-radius: var(--oly-radius);
  padding: 0.75rem 0.875rem;
  line-height: 1.4;
}
.olympicumb-forms-form textarea { min-height: 7rem; resize: vertical; }
.olympicumb-forms-form input::placeholder,
.olympicumb-forms-form textarea::placeholder { color: var(--oly-muted); opacity: 0.8; }
.olympicumb-forms-form input:focus,
.olympicumb-forms-form select:focus,
.olympicumb-forms-form textarea:focus {
  outline: 2px solid var(--oly-focus);
  outline-offset: -1px;
  border-color: var(--oly-focus);
}

/* select chevron */
.olympicumb-forms-form select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23225483'%3E%3Cpath fill-rule='evenodd' d='M5.23 7.21a.75.75 0 0 1 1.06.02L10 11.06l3.71-3.83a.75.75 0 1 1 1.08 1.04l-4.25 4.39a.75.75 0 0 1-1.08 0L5.21 8.27a.75.75 0 0 1 .02-1.06Z' clip-rule='evenodd'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.5rem;
}

/* checkboxes + radios */
.olympicumb-forms-form input[type="checkbox"],
.olympicumb-forms-form input[type="radio"] {
  width: 1.15rem;
  height: 1.15rem;
  accent-color: var(--oly-sun);
  vertical-align: middle;
}
.olympicumb-forms-form .checkboxlist > div,
.olympicumb-forms-form .radiobuttonlist > div { margin-bottom: 0.5rem; }
.olympicumb-forms-form .checkboxlist label,
.olympicumb-forms-form .radiobuttonlist label {
  display: inline;
  font-weight: 400;
  color: var(--oly-ink);
  margin-left: 0.5rem;
}

/* submit / navigation buttons */
.olympicumb-forms-form .umbraco-forms-navigation .button,
.olympicumb-forms-form input[type="submit"],
.olympicumb-forms-form button[type="submit"] {
  display: inline-block;
  background-color: var(--oly-sun);
  color: var(--oly-ink);
  font-weight: 700;
  border: 0;
  border-radius: var(--oly-radius);
  padding: 0.75rem 1.75rem;
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.olympicumb-forms-form .umbraco-forms-navigation .button:hover,
.olympicumb-forms-form input[type="submit"]:hover,
.olympicumb-forms-form button[type="submit"]:hover { background-color: var(--oly-sun-hover); }
.olympicumb-forms-form .button--delete { background-color: var(--oly-border); }

/* validation */
.olympicumb-forms-form .field-validation-error,
.olympicumb-forms-form .validation-summary-errors {
  display: block;
  color: #c0392b;
  font-size: 0.875rem;
  margin-top: 0.3rem;
}
.olympicumb-forms-form .input-validation-error { border-color: #c0392b !important; }

/* ---- opt-in: pills (checkbox / radio list) ---- */
.olympicumb-forms-form .oly-pills .checkboxlist,
.olympicumb-forms-form .oly-pills .radiobuttonlist {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
}
.olympicumb-forms-form .oly-pills .checkboxlist > div,
.olympicumb-forms-form .oly-pills .radiobuttonlist > div { margin: 0; }
.olympicumb-forms-form .oly-pills input { position: absolute; opacity: 0; width: 0; height: 0; }
.olympicumb-forms-form .oly-pills label {
  display: inline-block;
  margin: 0;
  padding: 0.5rem 1.1rem;
  border: 1px solid var(--oly-border);
  border-radius: 62.4375rem;
  background: #fff;
  color: var(--oly-navy);
  font-weight: 600;
  font-size: 0.9375rem;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}
.olympicumb-forms-form .oly-pills div:has(input:checked) label {
  background: var(--oly-sun);
  border-color: var(--oly-sun);
  color: var(--oly-ink);
}
.olympicumb-forms-form .oly-pills div:has(input:focus-visible) label { outline: 2px solid var(--oly-focus); outline-offset: 2px; }

/* ---- opt-in: two-column checkbox grid ---- */
.olympicumb-forms-form .oly-check-grid .checkboxlist {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem 1.5rem;
}
.olympicumb-forms-form .oly-check-grid .checkboxlist > div { margin: 0; }

/* ---- checkbox-list layouts driven by the field's DisplayLayout setting (theme renders .checkboxlist-{layout}) ---- */
/* "Horizontal" -> selectable pills (the comp's Preferred Venue / Ceremony Style) */
.olympicumb-forms-form .checkboxlist-horizontal { display: flex; flex-wrap: wrap; gap: 0.625rem; }
.olympicumb-forms-form .checkboxlist-horizontal > div { margin: 0; }
.olympicumb-forms-form .checkboxlist-horizontal input { position: absolute; opacity: 0; width: 0; height: 0; }
.olympicumb-forms-form .checkboxlist-horizontal label {
  display: inline-block;
  margin: 0;
  padding: 0.5rem 1.1rem;
  border: 1px solid var(--oly-border);
  border-radius: 62.4375rem;
  background: #fff;
  color: var(--oly-navy);
  font-weight: 600;
  font-size: 0.9375rem;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}
.olympicumb-forms-form .checkboxlist-horizontal div:has(input:checked) label {
  background: var(--oly-sun);
  border-color: var(--oly-sun);
  color: var(--oly-ink);
}
.olympicumb-forms-form .checkboxlist-horizontal div:has(input:focus-visible) label { outline: 2px solid var(--oly-focus); outline-offset: 2px; }
/* "Grid" -> two-column checkbox grid (the comp's Wedding Extras) */
.olympicumb-forms-form .checkboxlist-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem 1.5rem;
}
.olympicumb-forms-form .checkboxlist-grid > div { margin: 0; }
@media (max-width: 639px) {
  .olympicumb-forms-form .checkboxlist-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ---- layout grid (replaces the dropped Bootstrap default: row-fluid / col-md-*) ---- */
.olympicumb-forms-form fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.olympicumb-forms-form .row-fluid { display: flex; flex-wrap: wrap; column-gap: 1.5rem; }
.olympicumb-forms-form .umbraco-forms-container { flex: 1 1 100%; min-width: 0; }
.olympicumb-forms-form .umbraco-forms-container[class*="col-md-12"] { flex-basis: 100%; }
.olympicumb-forms-form .umbraco-forms-container[class*="col-md-9"]  { flex-basis: calc(75% - 0.375rem); }
.olympicumb-forms-form .umbraco-forms-container[class*="col-md-8"]  { flex-basis: calc(66.666% - 0.5rem); }
.olympicumb-forms-form .umbraco-forms-container[class*="col-md-6"]  { flex-basis: calc(50% - 0.75rem); }
.olympicumb-forms-form .umbraco-forms-container[class*="col-md-4"]  { flex-basis: calc(33.333% - 1rem); }
.olympicumb-forms-form .umbraco-forms-container[class*="col-md-3"]  { flex-basis: calc(25% - 1.125rem); }
@media (max-width: 639px) {
  .olympicumb-forms-form .umbraco-forms-container[class*="col-md-"] { flex-basis: 100%; }
}
.olympicumb-forms-form .umbraco-forms-navigation { margin-top: 1.25rem; }
.olympicumb-forms-form .umbraco-forms-hidden { display: none; }

/* ---- Form card (the comp's navy "Request a Quote" header over a white card) ---- */
.oly-form-card {
  background: #fff;
  border: 1px solid #c9e4f0;
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0, 85, 135, 0.06);
}
.oly-form-card-header {
  background: #3f5f86;
  color: #fff;
  font-weight: 700;
  font-size: 1.125rem;
  padding: 1rem 1.5rem;
}
.oly-form-card-body { padding: 1.5rem; }
/* the comp's submit button: yellow gradient, right-aligned */
.oly-form-card .umbraco-forms-navigation { text-align: right; }
.oly-form-card input[type="submit"],
.oly-form-card button[type="submit"],
.oly-form-card .umbraco-forms-navigation .button {
  background-image: linear-gradient(180deg, #ffe27a 0%, #fec600 100%);
}

/* ---- Form Block layout (page-level wrapper around an inline form + sidebar panels) ---- */
.oly-form-block { margin-top: 1.5rem; }
.oly-form-block--split {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2rem;
}
@media (min-width: 1024px) {
  .oly-form-block--split { grid-template-columns: minmax(0, 1fr) 21.25rem; align-items: start; }
}
.oly-form-block-sidebar { display: flex; flex-direction: column; gap: 1.25rem; }
.oly-form-panel {
  background: #fff;
  border: 1px solid #c9e4f0;
  border-radius: 0.75rem;
  padding: 1.5rem;
}
.oly-form-panel-heading { margin: 0 0 0.5rem; font-size: 1.125rem; font-weight: 700; color: #005587; }
.oly-form-panel-body { color: #292929; font-size: 0.9375rem; line-height: 1.5; }
.oly-form-panel-body :where(p, ul, ol) { margin: 0 0 0.5rem; }
.oly-form-panel-body ul { padding-left: 1.1rem; }
.oly-form-panel-body a { color: #0075ae; font-weight: 600; text-decoration: underline; }
/* the weddings comp's panels: the contact panel (any panel with a phone) is centred with a big phone number */
.oly-form-panel:has(a[href^="tel:"]) { text-align: center; }
.oly-form-panel-body a[href^="tel:"] {
  display: block;
  margin: 0.25rem 0;
  font-size: 1.875rem;
  font-weight: 800;
  color: #292929;
  text-decoration: none;
}
/* the trust panel's points as sky ticks (no bullets) */
.oly-form-panel-body ul {
  list-style: none;
  padding-left: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.oly-form-panel-body ul li { position: relative; padding-left: 1.75rem; color: #005587; }
.oly-form-panel-body ul li::before { content: "\2713"; position: absolute; left: 0; color: #0075ae; font-weight: 700; }
.oly-form-panel-link {
  display: inline-block;
  margin-top: 0.75rem;
  color: #0075ae;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 0.1875rem;
}
