body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #f4f6f8;
  color: #1a1a1a;
}

.booking-app {
  max-width: 480px;
  margin: 0 auto;
  padding: 24px 20px 60px;
}

/* Tablet/desktop: the mobile single-column layout above is intentionally left untouched --
   these only widen the container and split the form into two side-by-side columns (selection on
   the left, time/contact details on the right) instead of stretching one narrow column across a
   wide viewport. See ".form-col" below for the actual column split. */
@media (min-width: 760px) {
  .booking-app {
    max-width: 880px;
  }
}

@media (min-width: 1100px) {
  .booking-app {
    max-width: 1040px;
  }
}

.app-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

h1 {
  font-size: 22px;
  margin: 0;
  flex: 1;
  min-width: 0;
}

/* --- Language switcher --- */

.lang-switcher {
  display: flex;
  flex-shrink: 0;
  background: #e9ecf1;
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
}

.lang-switcher-btn {
  border: none;
  background: transparent;
  color: #667085;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 6px 11px;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s ease, color 0.15s ease;
}

.lang-switcher-btn:hover {
  color: #344054;
}

.lang-switcher-btn.active {
  background: #2563eb;
  color: #fff;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.4);
}

.notice {
  background: #fff3cd;
  border: 1px solid #ffe69c;
  color: #664d03;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
}

/* Shown instead of the booking form when the module isn't licensed -- a calm "this feature
   exists" teaser, not an error/warning state, so it reads as a product a bank could ask their
   vendor about rather than a broken page. */
.teaser-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 44px 28px;
  text-align: center;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  /* Keeps the message from stretching edge-to-edge when .booking-app widens on tablet/desktop. */
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.teaser-title {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 700;
  color: #1a1a1a;
}

.teaser-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: #667085;
  max-width: 320px;
  margin-left: auto;
  margin-right: auto;
}

.booking-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

/* The explicit display:flex above otherwise wins over the [hidden] attribute's default
   display:none -- without this, setting form.hidden = true in JS (module not licensed) leaves
   the whole form visibly rendered underneath the teaser card. */
.booking-form[hidden] {
  display: none;
}

/* Mobile: the two ".form-col" wrappers (added purely for the desktop grid below) are invisible
   to layout, so .booking-form's own flex-column above lays out their children exactly as if the
   wrappers weren't there -- the mobile design is intentionally unchanged. */
.form-col {
  display: contents;
}

@media (min-width: 760px) {
  .booking-form {
    display: grid;
    grid-template-columns: minmax(280px, 360px) 1fr;
    gap: 6px 32px;
    align-items: start;
    padding: 28px;
  }

  .form-col {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
  }

  /* Left column (branch/service/calendar) picks a date; right column (revealed once a date is
     picked) shows that day's time slots followed by the contact fields -- a natural pick-date,
     then-pick-time-and-finish left-to-right flow rather than one long scroll. */
  .calendar-section {
    flex: 1;
  }
}

.booking-form label {
  font-size: 13px;
  font-weight: 600;
  margin-top: 10px;
  color: #444;
}

.booking-form select,
.booking-form input {
  padding: 10px 12px;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  font-size: 15px;
}

.booking-form select:disabled,
.booking-form input:disabled {
  background: #f2f2f2;
  color: #999;
}

.muted {
  color: #888;
  font-size: 13px;
}

/* Honeypot anti-spam field -- off-screen, not display:none (some bots skip display:none
   fields specifically to evade this trick; position it out of the viewport instead). */
.hp-field {
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* --- Calendar --- */

.calendar-section {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fafbfc;
}

.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.cal-month-label {
  font-weight: 600;
  font-size: 15px;
  text-transform: capitalize;
}

.cal-nav {
  width: 32px;
  height: 32px;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  background: #fff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  color: #333;
}

.cal-nav:disabled {
  color: #ccc;
  cursor: not-allowed;
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 12px;
  color: #888;
  margin-bottom: 4px;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.cal-cell {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  padding: 0;
  font-family: inherit;
}

.cal-empty {
  visibility: hidden;
}

.cal-available {
  background: #e8f0fe;
  color: #1d4ed8;
  border-color: #c3d9fb;
  cursor: pointer;
  font-weight: 600;
}

.cal-available:hover {
  background: #d5e4fd;
}

.cal-unavailable {
  color: #c2c7d0;
  cursor: not-allowed;
}

.cal-selected {
  background: #2563eb !important;
  color: #fff !important;
  border-color: #2563eb !important;
}

.calendar-legend {
  margin: 10px 0 0;
  font-size: 12px;
  color: #666;
  display: flex;
  align-items: center;
}

.legend-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  margin-right: 4px;
}

.legend-available {
  background: #e8f0fe;
  border: 1px solid #c3d9fb;
}

.legend-unavailable {
  background: transparent;
  border: 1px solid #d0d5dd;
}

/* --- Time slots --- */

.time-section {
  margin-top: 14px;
}

.time-section-title {
  font-size: 13px;
  font-weight: 600;
  color: #444;
  margin: 0 0 8px;
}

.time-group h4 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #888;
  margin: 12px 0 6px;
}

.time-slot-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
  gap: 8px;
}

.time-slot-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 4px;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font-family: inherit;
}

.time-slot-btn:hover {
  border-color: #93b4f5;
}

.time-slot-btn.selected {
  background: #2563eb;
  border-color: #2563eb;
}

.time-slot-time {
  font-size: 14px;
  font-weight: 600;
  color: #1a1a1a;
}

.time-slot-btn.selected .time-slot-time {
  color: #fff;
}

.time-slot-remaining {
  font-size: 11px;
  color: #888;
}

.time-slot-btn.selected .time-slot-remaining {
  color: #dbe6fd;
}

#submit-button {
  margin-top: 20px;
  padding: 12px;
  border: none;
  border-radius: 8px;
  background: #2563eb;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

#submit-button:disabled {
  background: #9db5e8;
  cursor: not-allowed;
}

.result {
  margin-top: 20px;
  padding: 16px;
  border-radius: 10px;
}

.result.success {
  background: #d1fae5;
  border: 1px solid #6ee7b7;
  color: #065f46;
}

.result.error {
  background: #fee2e2;
  border: 1px solid #fca5a5;
  color: #991b1b;
}
