:root {
  color-scheme: light;
  --navy: #071d2d;
  --navy-soft: #0b3446;
  --cyan: #0fd2dc;
  --blue: #0b73e8;
  --text: #223142;
  --muted: #6d7d92;
  --line: #dce9f2;
  --panel: #ffffff;
  --soft: #edf9fb;
  --danger: #a91919;
  --success: #0a9c68;
}

* {
  box-sizing: border-box;
}

body.appointment-public {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 18%, rgba(16, 200, 210, 0.22), transparent 30%),
    linear-gradient(135deg, #061928 0%, #0b3446 42%, #eef9fb 42%, #ffffff 100%);
}

.booking-shell {
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
  padding: 44px 0;
}

.booking-hero {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 32px;
  align-items: center;
  color: #ffffff;
  margin-bottom: 28px;
}

.brand-card {
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--navy);
  padding: 28px;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.22);
  text-align: center;
}

.brand-card img {
  display: block;
  max-width: 100%;
  margin: 0 auto 14px;
}

.brand-card span,
.eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.78rem;
  font-weight: 900;
}

.eyebrow {
  color: var(--cyan);
}

h1 {
  margin: 10px 0 14px;
  font-size: clamp(2.5rem, 7vw, 5.6rem);
  line-height: 0.94;
  letter-spacing: -0.07em;
}

.booking-hero p {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 1.2rem;
  line-height: 1.55;
}

.booking-panel {
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(220, 233, 242, 0.92);
  border-radius: 36px;
  padding: clamp(22px, 4vw, 42px);
  box-shadow: 0 20px 70px rgba(4, 28, 42, 0.18);
}

.booking-form {
  display: grid;
  gap: 24px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

label {
  display: grid;
  gap: 8px;
  color: #415168;
  font-weight: 900;
}

.span-2 {
  grid-column: span 2;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 14px 16px;
  font: inherit;
  font-weight: 800;
  color: var(--text);
  background: #ffffff;
  outline: none;
}

textarea {
  resize: vertical;
  min-height: 110px;
  font-weight: 700;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 4px rgba(15, 210, 220, 0.16);
}

.availability-actions,
.submit-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
}

#selected-slot-label {
  color: var(--muted);
}

button,
.link-button {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 14px 22px;
  font: inherit;
  font-weight: 1000;
  cursor: pointer;
  text-decoration: none;
}

.primary-button {
  background: var(--cyan);
  color: var(--navy);
  box-shadow: 0 14px 34px rgba(15, 210, 220, 0.28);
}

.ghost-button,
.link-button {
  background: #e9f3f8;
  color: var(--navy);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  box-shadow: none;
}

.slots-container {
  display: grid;
  gap: 16px;
}

.slot-group {
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 18px;
  background: linear-gradient(145deg, #f9fdff, #eef9fb);
}

.slot-group header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.slot-group h3 {
  margin: 0;
  color: var(--navy);
}

.slot-group header span {
  color: var(--muted);
  font-weight: 900;
}

.slot-list {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.slot-button {
  background: #ffffff;
  border: 1px solid var(--line);
  color: var(--navy);
  padding: 11px 16px;
  display: grid;
  gap: 2px;
  min-width: 166px;
  text-align: center;
}

.slot-button.selected {
  background: var(--navy);
  color: #ffffff;
  border-color: var(--navy);
}

.slot-button.unavailable,
.slot-button.unavailable:disabled {
  background: #e3e8ec;
  border-color: #d1d8de;
  color: #75808a;
  cursor: not-allowed;
  opacity: 1;
  box-shadow: none;
}

.slot-button.unavailable small {
  font-size: 0.68rem;
  font-weight: 900;
  color: #68727c;
}

.busy-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 14px;
  color: var(--muted);
}

.busy-list small {
  border-radius: 999px;
  background: #fff4f2;
  color: #a85036;
  padding: 6px 10px;
  font-weight: 900;
}

.empty-state {
  color: var(--muted);
  font-weight: 800;
}

.closed-day {
  border: 1px solid #d7dee4;
  border-radius: 20px;
  padding: 18px;
  background: #edf0f2;
  color: #65717b;
  text-align: center;
}

.appointment-status {
  min-height: 34px;
  border-radius: 20px;
  padding: 12px 16px;
  background: var(--soft);
  color: var(--navy);
  font-weight: 900;
}

.appointment-status:empty {
  display: none;
}

.appointment-status[data-type="ok"] {
  background: #e8fff5;
  color: var(--success);
}

.appointment-status[data-type="error"] {
  background: #fff0f0;
  color: var(--danger);
}

.appointment-status[data-type="warn"] {
  background: #fff7df;
  color: #7a5a00;
}

@media (max-width: 820px) {
  .booking-shell {
    width: min(100% - 18px, 620px);
    padding: 20px 0;
  }

  .booking-hero {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .brand-card {
    max-width: 260px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .span-2 {
    grid-column: auto;
  }

  .availability-actions,
  .submit-row {
    align-items: stretch;
    flex-direction: column;
  }

  button,
  .link-button {
    width: 100%;
    text-align: center;
  }
}
