/* Portale prenotazioni — Centro Analisi Sa.Ta. / stile Incifra */
.page-booking {
  min-height: 100vh;
  background: linear-gradient(180deg, #e8f6fc 0%, #f4f6f9 120px, #f4f6f9 100%);
  color: #1a2b3c;
  font-family: "Segoe UI", system-ui, Tahoma, Geneva, Verdana, sans-serif;
}

.booking-header {
  background: #fff;
  border-bottom: 4px solid var(--brand, #00aeef);
  padding: 1.25rem 1.5rem 1rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.booking-header-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  text-align: left;
}

.booking-header img {
  max-height: 56px;
  max-width: 220px;
  object-fit: contain;
}

.booking-header h1 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1a2b3c;
  margin: 0;
}

.booking-header .subtitle {
  font-size: 0.9rem;
  color: #5a6b7d;
  margin: 0.2rem 0 0;
}

.contact-phones {
  text-align: center;
  margin: 0.75rem 0 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--brand, #00aeef);
}

.booking-alert {
  background: #fff8e6;
  border: 1px solid #f0d78c;
  border-left: 4px solid #ffc107;
  color: #3d3422;
  padding: 1rem 1.25rem;
  margin: 1rem auto;
  max-width: 720px;
  border-radius: 0 12px 12px 0;
  font-size: 0.9rem;
  line-height: 1.55;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.booking-alert-operator {
  margin: 0;
}

.booking-alert-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1a2b3c;
  margin: 0 0 0.75rem;
  line-height: 1.35;
}

.booking-alert-warn {
  margin: 1rem 0 0.5rem;
  padding: 0.65rem 0.75rem;
  background: rgba(255, 193, 7, 0.2);
  border-radius: 8px;
}

.booking-alert-exams {
  list-style: none;
  margin: 0.5rem 0 1rem;
  padding: 0;
}

.booking-alert-exams li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.5rem 0.65rem;
  margin-bottom: 0.35rem;
  background: #fff;
  border: 1px solid #e8e0c8;
  border-radius: 8px;
  font-weight: 600;
  color: #334155;
}

.booking-alert-exams .exam-emoji {
  flex-shrink: 0;
  font-size: 1.1rem;
  line-height: 1.3;
}

.booking-alert-subtitle {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0.75rem 0 0.35rem;
  color: #1a2b3c;
}

.booking-alert-phone {
  margin: 0.5rem 0;
  font-size: 1.15rem;
}

.booking-alert-phone a {
  color: var(--brand, #00aeef);
  text-decoration: none;
}

.booking-alert-phone a:hover {
  text-decoration: underline;
}

.booking-alert-hint {
  margin: 0.75rem 0 0;
  font-size: 0.85rem;
  color: #5a6b7d;
}

.booking-stepper {
  display: flex;
  justify-content: center;
  gap: 0.25rem;
  max-width: 720px;
  margin: 1rem auto 0;
  padding: 0 0.5rem;
  flex-wrap: wrap;
}

.booking-stepper .step {
  flex: 1;
  min-width: 72px;
  text-align: center;
  font-size: 0.7rem;
  color: #94a3b8;
  padding-bottom: 0.5rem;
  border-bottom: 3px solid #dde3ea;
  font-weight: 600;
}

.booking-stepper .step span {
  display: block;
  width: 1.5rem;
  height: 1.5rem;
  line-height: 1.5rem;
  border-radius: 50%;
  background: #dde3ea;
  color: #64748b;
  margin: 0 auto 0.35rem;
  font-size: 0.75rem;
}

.booking-stepper .step.active {
  color: var(--brand, #00aeef);
  border-color: var(--brand, #00aeef);
}

.booking-stepper .step.active span {
  background: var(--brand, #00aeef);
  color: #fff;
}

.booking-stepper .step.done {
  color: #15803d;
  border-color: #86efac;
}

.booking-stepper .step.done span {
  background: #22c55e;
  color: #fff;
}

.booking-main {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 1rem 2rem;
}

.booking-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.booking-card {
  background: #fff;
  border: 1px solid #dde3ea;
  border-radius: 12px;
  padding: 1.35rem 1.5rem;
  margin-bottom: 1rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.booking-card h2 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
  color: var(--brand, #00aeef);
}

.card-hint {
  color: #64748b;
  font-size: 0.88rem;
  margin-bottom: 1rem;
  line-height: 1.45;
}

.booking-card label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: #5a6b7d;
  margin: 0.85rem 0 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.label-note {
  text-transform: none;
  font-weight: 500;
  color: #94a3b8;
}

.booking-card input,
.booking-card select,
.input-date {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid #c5d0dc;
  border-radius: 8px;
  font-size: 1rem;
  box-sizing: border-box;
}

.booking-card input:focus,
.input-date:focus {
  outline: 2px solid var(--brand, #00aeef);
  border-color: var(--brand, #00aeef);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

@media (max-width: 520px) {
  .form-row {
    grid-template-columns: 1fr;
  }
  .booking-stepper .step {
    font-size: 0.65rem;
  }
}

/* Prestazioni */
.pp-list {
  list-style: none;
}

.pp-category-head {
  padding: 0.75rem 0 0.35rem;
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  list-style: none;
}

.pp-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  margin-bottom: 0.5rem;
  border: 1px solid #e8eef4;
  border-radius: 10px;
  gap: 0.75rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.pp-item:not(.pp-disabled):hover {
  border-color: var(--brand, #00aeef);
  box-shadow: 0 2px 8px rgba(0, 174, 239, 0.12);
}

.pp-item.pp-disabled {
  background: #f8fafc;
  opacity: 0.92;
}

.pp-main {
  flex: 1;
  min-width: 0;
}

.pp-name {
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.3;
}

.pp-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  margin-top: 0.35rem;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  background: #fee2e2;
  color: #991b1b;
}

.pp-badge-ok {
  background: #dcfce7;
  color: #166534;
}

.pp-duration {
  display: block;
  font-size: 0.8rem;
  color: #94a3b8;
  margin-top: 0.2rem;
}

.pp-actions {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex-shrink: 0;
}

@media (min-width: 480px) {
  .pp-actions {
    flex-direction: row;
  }
}

.btn-pp {
  padding: 0.5rem 0.9rem;
  border-radius: 8px;
  border: 1px solid var(--brand, #00aeef);
  background: #fff;
  color: var(--brand, #00aeef);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.btn-pp:hover {
  background: #e8f6fc;
}

.btn-pp-primary {
  background: var(--brand, #00aeef);
  color: #fff;
  border-color: var(--brand, #00aeef);
}

.btn-pp-primary:hover {
  filter: brightness(0.95);
}

.btn-pp:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-pp-inline {
  margin-bottom: 1rem;
}

.selected-meta {
  color: #64748b;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.schedule-hours {
  background: #e8f6fc;
  border: 1px solid #b8e6f8;
  border-radius: 8px;
  padding: 0.65rem 0.85rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #0c4a6e;
  margin-bottom: 1rem;
}

.booking-calendar {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1rem;
}

.cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.cal-month-label {
  font-weight: 700;
  font-size: 1rem;
  text-transform: capitalize;
  color: #1a2b3c;
}

.cal-nav {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 8px;
  border: 1px solid #c5d0dc;
  background: #fff;
  font-size: 1.25rem;
  cursor: pointer;
  line-height: 1;
  color: var(--brand, #00aeef);
}

.cal-nav:hover {
  background: #e8f6fc;
}

.cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.25rem;
  margin-bottom: 0.35rem;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.35rem;
}

.cal-day {
  aspect-ratio: 1;
  min-height: 2.5rem;
  border-radius: 8px;
  border: 1px solid transparent;
  background: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  color: #334155;
}

.cal-day-empty {
  visibility: hidden;
  pointer-events: none;
}

.cal-day-available {
  border-color: #86efac;
  background: #f0fdf4;
  color: #166534;
}

.cal-day-available:hover {
  background: #dcfce7;
  border-color: #22c55e;
}

.cal-day-selected {
  background: var(--brand, #00aeef) !important;
  border-color: var(--brand, #00aeef) !important;
  color: #fff !important;
}

.cal-day-full {
  background: #f1f5f9;
  color: #94a3b8;
  cursor: not-allowed;
  text-decoration: line-through;
}

.cal-day-disabled {
  background: transparent;
  color: #cbd5e1;
  cursor: not-allowed;
}

.cal-legend {
  margin: 0.75rem 0 0;
  font-size: 0.8rem;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.dot-available {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  background: #22c55e;
  display: inline-block;
}

.slot-label {
  margin-top: 0.5rem;
}

.slot-chip {
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
  border: 1px solid #c5d0dc;
  background: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  color: #334155;
}

.day-chip:hover,
.slot-chip:hover {
  border-color: var(--brand, #00aeef);
}

.day-chip.active,
.slot-chip.active {
  background: var(--brand, #00aeef);
  border-color: var(--brand, #00aeef);
  color: #fff;
}

.slots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.slots-loading,
.slots-empty {
  text-align: center;
  padding: 1rem;
  color: #64748b;
  font-size: 0.9rem;
}

.slots-empty {
  background: #f8fafc;
  border-radius: 8px;
  border: 1px dashed #cbd5e1;
}

.step-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.25rem;
  flex-wrap: wrap;
}

.step-actions .btn-booking-main,
.step-actions .btn-booking-secondary {
  flex: 1;
  min-width: 140px;
  margin-top: 0;
}

.btn-booking-main {
  padding: 0.9rem 1.25rem;
  background: var(--brand, #00aeef);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-booking-main:hover:not(:disabled) {
  filter: brightness(0.95);
}

.btn-booking-main:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-booking-secondary {
  padding: 0.9rem 1.25rem;
  background: #fff;
  color: #334155;
  border: 1px solid #c5d0dc;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-booking-secondary:hover {
  background: #f8fafc;
}

.booking-summary {
  background: #e8f6fc;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
  border: 1px solid #b8e6f8;
}

.booking-summary dl {
  margin: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.35rem 1rem;
  font-size: 0.9rem;
}

.booking-summary dt {
  font-weight: 600;
  color: #64748b;
}

.booking-summary dd {
  margin: 0;
  font-weight: 600;
  color: #1a2b3c;
}

.privacy-check {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin: 1rem 0;
  font-size: 0.9rem;
  line-height: 1.45;
}

.privacy-check input {
  width: auto;
  margin-top: 0.25rem;
}

.privacy-link {
  color: var(--brand, #00aeef);
  cursor: pointer;
  text-decoration: underline;
}

.booking-footer {
  text-align: center;
  padding: 1.5rem;
  font-size: 0.85rem;
  color: #5a6b7d;
  border-top: 1px solid #dde3ea;
  margin-top: 1rem;
  background: #fff;
}

.booking-footer a {
  color: var(--brand, #00aeef);
}

.booking-footer .matrix-credit {
  margin-top: 0.65rem;
  padding-bottom: 0;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

.modal-box {
  background: #fff;
  max-width: 560px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  border-radius: 12px;
  padding: 1.5rem;
  position: relative;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

.modal-box h3 {
  margin-bottom: 1rem;
  color: var(--brand, #00aeef);
  padding-right: 2rem;
}

.modal-close {
  position: absolute;
  top: 0.75rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #5a6b7d;
}

.modal-body {
  font-size: 0.9rem;
  line-height: 1.55;
  color: #334155;
}

.modal-body p {
  margin: 0 0 0.75rem;
}

.modal-ok {
  width: 100%;
  margin-top: 1rem;
}

.booking-done {
  text-align: center;
  padding: 1.5rem 0.5rem;
}

.done-icon {
  width: 3.5rem;
  height: 3.5rem;
  line-height: 3.5rem;
  border-radius: 50%;
  background: #22c55e;
  color: #fff;
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0 auto 1rem;
}

.done-lead {
  color: #64748b;
  margin-bottom: 1rem;
  line-height: 1.5;
}

.booking-done .code {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--brand, #00aeef);
  margin: 0.5rem 0;
  letter-spacing: 0.06em;
  font-family: ui-monospace, monospace;
}

.btn-copy-code {
  margin: 0 auto 1rem;
  display: inline-block;
}

.qrcode-wrap {
  display: inline-block;
  padding: 0.75rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  margin-bottom: 1rem;
}

.done-summary {
  font-weight: 600;
  color: #1a2b3c;
  margin-bottom: 0.5rem;
}

.done-hint {
  color: #64748b;
  font-size: 0.88rem;
  margin-bottom: 1.25rem;
  line-height: 1.45;
}

.hidden {
  display: none !important;
}

.breadcrumb {
  margin-bottom: 0.75rem;
}

.bc-link {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.88rem;
  color: var(--brand, #00aeef);
  font-weight: 600;
  cursor: pointer;
}

.bc-link:hover {
  text-decoration: underline;
}

.operator-notice {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  padding: 1rem;
  border-radius: 8px;
  margin-top: 0.5rem;
  font-size: 0.9rem;
}
