/* UBCM Calendar Online Order: teal theme on Bootstrap 5 (same look as the UBCM registration forms) */

:root {
  --ubcm-teal: #00798c;
  --ubcm-teal-rgb: 0, 121, 140;
  --ubcm-teal-dark: #005766;
  --ubcm-teal-darker: #003d47;
  --ubcm-teal-light: #e5f3f5;
  --ubcm-ink: #1f2d3a;
  --ubcm-accent: #f2a900;

  --bs-primary: var(--ubcm-teal);
  --bs-primary-rgb: var(--ubcm-teal-rgb);
  --bs-link-color: var(--ubcm-teal-dark);
  --bs-link-color-rgb: 0, 87, 102;
  --bs-link-hover-color: var(--ubcm-teal-darker);
  --bs-body-color: var(--ubcm-ink);
  --bs-body-font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --bs-focus-ring-color: rgba(var(--ubcm-teal-rgb), .3);
}

html, body { height: 100%; }
body {
  display: flex;
  flex-direction: column;
  background: #f4f7f8;
}

.skip-link { position: absolute; top: .5rem; left: .5rem; z-index: 10; background: #fff; padding: .5rem 1rem; }

/* Header and footer */
.site-header { background: #fff; }
.site-logo { height: 56px; width: auto; }
.header-tag { color: var(--ubcm-teal-dark); font-weight: 600; letter-spacing: .02em; }
.header-band {
  background: linear-gradient(120deg, var(--ubcm-teal-dark) 0%, var(--ubcm-teal) 100%);
  color: #fff;
  border-bottom: 4px solid var(--ubcm-accent);
}
.header-band h1 { font-weight: 700; }
.lead-sm { font-size: 1.1rem; opacity: .9; }
.site-footer { background: var(--ubcm-teal-darker); color: rgba(255, 255, 255, .85); }
.site-footer a { color: #fff; }

/* Buttons and controls in teal */
.btn-primary {
  --bs-btn-bg: var(--ubcm-teal);
  --bs-btn-border-color: var(--ubcm-teal);
  --bs-btn-hover-bg: var(--ubcm-teal-dark);
  --bs-btn-hover-border-color: var(--ubcm-teal-dark);
  --bs-btn-active-bg: var(--ubcm-teal-darker);
  --bs-btn-active-border-color: var(--ubcm-teal-darker);
  --bs-btn-disabled-bg: var(--ubcm-teal);
  --bs-btn-disabled-border-color: var(--ubcm-teal);
  --bs-btn-focus-shadow-rgb: var(--ubcm-teal-rgb);
}
.btn-outline-primary {
  --bs-btn-color: var(--ubcm-teal-dark);
  --bs-btn-border-color: var(--ubcm-teal);
  --bs-btn-hover-bg: var(--ubcm-teal);
  --bs-btn-hover-border-color: var(--ubcm-teal);
  --bs-btn-active-bg: var(--ubcm-teal-dark);
  --bs-btn-focus-shadow-rgb: var(--ubcm-teal-rgb);
}
.text-primary { color: var(--ubcm-teal) !important; }
.text-primary-dark { color: var(--ubcm-teal-dark); }

.form-control:focus, .form-select:focus, .form-check-input:focus {
  border-color: var(--ubcm-teal);
  box-shadow: 0 0 0 .25rem rgba(var(--ubcm-teal-rgb), .2);
}
.form-check-input:checked { background-color: var(--ubcm-teal); border-color: var(--ubcm-teal); }
.form-check-input { border-color: #8a9aa5; }
.form-label, legend.form-label { font-weight: 600; }
.req { color: #b02a37; }

.card { border-radius: .75rem; }
.section-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--ubcm-teal-dark);
  padding-bottom: .5rem;
  margin-bottom: 1rem;
  border-bottom: 2px solid var(--ubcm-teal-light);
}

/* Landing page */
.feature {
  background: var(--ubcm-teal-light);
  border-radius: .6rem;
  padding: 1.1rem;
}
.feature .bi { font-size: 1.6rem; color: var(--ubcm-teal); display: block; margin-bottom: .4rem; }

/* Progress stepper */
.stepper ol { gap: .5rem; counter-reset: none; }
.stepper li {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  color: #6c7a86;
  font-size: .85rem;
}
.stepper li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 1rem;
  left: calc(50% + 1.25rem);
  width: calc(100% - 2.5rem + .5rem);
  height: 2px;
  background: #cfd8dd;
}
.stepper .dot {
  width: 2rem; height: 2rem;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: #fff;
  border: 2px solid #cfd8dd;
  font-weight: 700;
  margin-bottom: .35rem;
  position: relative; z-index: 1;
}
.stepper li.active { color: var(--ubcm-teal-dark); font-weight: 600; }
.stepper li.active .dot { border-color: var(--ubcm-teal); color: var(--ubcm-teal); box-shadow: 0 0 0 4px rgba(var(--ubcm-teal-rgb), .15); }
.stepper li.done .dot { background: var(--ubcm-teal); border-color: var(--ubcm-teal); color: #fff; }
.stepper li.done:not(:last-child)::after { background: var(--ubcm-teal); }
@media (max-width: 575.98px) {
  .stepper .label { font-size: .72rem; }
}

/* Choice lists */
.choice-group .form-check { margin-bottom: .4rem; }
.confirm-check {
  background: #f8fafb;
  border: 1px solid #e3e9ec;
  border-radius: .5rem;
  padding: .75rem 1rem .75rem 2.5rem;
  margin-bottom: .6rem;
}
.confirm-check .form-check-input { margin-left: -1.6rem; }
.form-check-input.is-invalid ~ .form-check-label { color: inherit; }
.confirm-check:has(.is-invalid) { border-color: #dc3545; background: #fff5f5; }

.program-option {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  border: 2px solid #e3e9ec;
  border-radius: .6rem;
  padding: 1rem 1.15rem;
  margin-bottom: .75rem;
  cursor: pointer;
  background: #fff;
  transition: border-color .15s, background-color .15s;
}
.program-option .form-check-input { flex-shrink: 0; margin-top: .25rem; width: 1.25rem; height: 1.25rem; }
.program-option:hover { border-color: rgba(var(--ubcm-teal-rgb), .5); }
.program-option:has(:checked) { border-color: var(--ubcm-teal); background: var(--ubcm-teal-light); }
.program-option:has(.is-invalid) { border-color: #dc3545; }

.notice {
  background: var(--ubcm-teal-light);
  border-left: 4px solid var(--ubcm-teal);
  border-radius: .4rem;
  padding: 1rem 1.25rem;
  font-size: .95rem;
}

/* Signature pad */
.signature-wrap {
  position: relative;
  border: 2px dashed #9fb1ba;
  border-radius: .5rem;
  background: #fff;
  height: 180px;
}
.signature-wrap canvas { width: 100%; height: 100%; display: block; cursor: crosshair; border-radius: .5rem; }
.signature-wrap canvas:focus-visible { outline: 3px solid rgba(var(--ubcm-teal-rgb), .4); }
.signature-wrap.is-invalid { border-color: #dc3545; }
.signature-hint {
  position: absolute;
  left: 1rem; bottom: .75rem; right: 5rem;
  border-top: 1px solid #c8d3d8;
  padding-top: .2rem;
  color: #9aa8b1;
  font-size: .8rem;
  pointer-events: none;
}
.signature-wrap.has-ink .signature-hint { color: transparent; }
.signature-clear { position: absolute; top: .25rem; right: .25rem; text-decoration: none; }

/* Page navigation */
.step-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e3e9ec;
}

/* Confirmation */
.confirm-icon {
  width: 4.5rem; height: 4.5rem;
  margin: 0 auto;
  border-radius: 50%;
  background: var(--ubcm-teal);
  color: #fff;
  font-size: 2.5rem;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 8px var(--ubcm-teal-light);
}
.confirm-ref {
  display: inline-block;
  background: var(--ubcm-teal-light);
  border: 1px dashed var(--ubcm-teal);
  border-radius: .5rem;
  padding: .75rem 1.5rem;
}
.confirm-details { max-width: 32rem; }

@media print {
  .site-header .header-band, .site-footer, .stepper { display: none !important; }
  body { background: #fff; }
  .card { box-shadow: none !important; }
}

/* ---------------------------------------------------------------------------
   Calendar order additions
   --------------------------------------------------------------------------- */

.order-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  justify-content: space-between;
  border: 2px solid #e3e9ec;
  border-radius: .6rem;
  padding: 1rem 1.15rem;
  background: #fff;
}
.order-item:focus-within { border-color: var(--ubcm-teal); background: var(--ubcm-teal-light); }
.order-item-qty { width: 8rem; flex-shrink: 0; }
@media (max-width: 575.98px) {
  .order-item { flex-direction: column; }
  .order-item-qty { width: 100%; }
}

.order-table thead th {
  color: var(--ubcm-teal-dark);
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .03em;
  border-bottom-color: var(--ubcm-teal-light);
}
.order-table tfoot td { border-bottom: 0; padding-top: .3rem; padding-bottom: .3rem; }
.order-table tfoot tr:first-child td { padding-top: .9rem; border-top: 2px solid var(--ubcm-teal-light); }
.order-table .order-total td {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ubcm-teal-dark);
  padding-top: .75rem;
}
.stepper .dot .bi { font-size: 1rem; line-height: 1; }
