/* Public booking follows the new Scrolltool website. Keep admin styles separate. */
body.booking-page {
  --primary: var(--booking-primary-button-background);
  --primary-foreground: var(--booking-primary-button-text-color);
  --border: var(--booking-time-border-color);
  --secondary: var(--booking-card-background);
  --ring: var(--booking-primary-button-border-color);
  background: var(--booking-page-background);
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
}

.booking-page :is(button, input, select, textarea, h2, h3, p, label, small),
.booking-page .booking-modal-dialog :is(p, a, strong),
body.booking-page #booking-form-panel :is(button, input, select, textarea, h2, h3, p, label, small) {
  font-family: var(--booking-font-family);
}

.booking-page .date-option strong {
  font-weight: var(--booking-calendar-date-font-weight);
}

.booking-page .selected-time-zone-summary,
#booking-form-panel #selected-slot-summary {
  font-weight: 400;
}

#booking-form-panel .booking-form-section-title { font-weight: 700; }
#booking-form-panel .back-button,
#booking-form-panel .secondary-button { font-weight: 600; }

.booking-page .booking-modal-dialog h2 { font-weight: 700; line-height: 1.12; }
.booking-page .booking-modal-dialog p { font-weight: 400; line-height: 1.55; }

.booking-page .booking-hero {
  padding: 0;
  background: transparent;
}

.booking-page .booking-panel {
  padding: clamp(18px, 3vw, 32px);
  border-color: var(--border);
  box-shadow: none;
}

.booking-page .smartm-widget {
  background: var(--booking-page-background);
}

.booking-page .smartm-widget::before {
  background-image: var(--booking-page-background-image);
  background-color: transparent;
}

.booking-page .date-option {
  border-radius: 12px;
}

.booking-page .calendar-grid.empty > p {
  grid-column: 1 / -1;
}

.booking-page .time-option {
  min-height: calc(var(--booking-time-button-height) * 1px);
  border-radius: 999px;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
}

.booking-page .time-option span {
  font-size: clamp(16px, 1.6vw, 20px);
  font-weight: 600;
}

.booking-page .time-option::before {
  content: none;
}

.booking-page .selected-date-label {
  white-space: normal;
}

.booking-page .selected-date-panel {
  align-items: flex-start;
  flex-direction: column;
  gap: 8px;
}

.booking-page .selected-time-zone-summary {
  text-align: left;
}

/* The visible label occupies row 1; align the hint with the input in row 2. */
#booking-form-panel .external-meeting-url-field .field-info-tooltip {
  grid-row: 2;
}

body.booking-page #booking-form-panel {
  padding: 30px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 24px;
  background: var(--booking-card-background);
  box-shadow: 0 32px 96px rgba(0, 0, 0, .58);
}

#booking-form-panel .booking-form-layout {
  row-gap: 24px;
}

#booking-form-panel #client-form-title {
  font-family: var(--booking-form-title-font-family);
  font-size: clamp(26px, 3vw, 30px);
  letter-spacing: -0.025em;
}

#booking-form-panel .selected-slot-summary {
  display: block;
  margin-top: 12px;
  line-height: 1.5;
}

#booking-form-panel .field span.field-label:not(.info-tooltip):not(.telegram-toggle-visual):not(.telegram-toggle-text) {
  position: static;
  display: block;
  width: auto;
  height: auto;
  margin-bottom: 7px;
  overflow: visible;
  clip: auto;
  white-space: normal;
  font-size: 13px;
  font-weight: 650;
  color: var(--booking-form-label-color);
}

#booking-form-panel input:not([type="checkbox"]):not([type="hidden"]):not(.booking-honeypot),
#booking-form-panel select,
#booking-form-panel textarea {
  min-height: max(48px, calc(var(--booking-form-input-height) * 1px));
  padding: 11px 13px;
  font-size: max(16px, calc(var(--booking-form-input-font-size) * 1px));
  font-weight: 500;
  border-radius: 12px;
  border-color: var(--booking-form-input-border-color);
  background-color: var(--booking-form-input-background);
  backdrop-filter: none;
  outline: 0;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

#booking-form-panel select {
  padding-right: 30px;
}

#booking-form-panel textarea {
  min-height: 120px;
}

#booking-form-panel .primary-button {
  min-height: max(48px, calc(var(--booking-primary-button-height) * 1px));
  padding: 13px 22px;
  border-radius: 999px;
  border-color: var(--booking-primary-button-border-color);
  background: var(--booking-primary-button-background);
  color: var(--booking-primary-button-text-color);
  font-size: calc(var(--booking-primary-button-font-size) * 1px);
}

#booking-form-panel .primary-button:hover:not(:disabled) {
  background: color-mix(in srgb, var(--booking-primary-button-background) 85%, white);
}

#booking-form-panel .secondary-button {
  border-radius: 999px;
  min-height: 48px;
  width: auto;
  align-self: center;
  background: transparent;
}

#booking-form-panel .booking-form-actions {
  flex-direction: column;
  gap: 12px;
}

#booking-form-panel .booking-form-actions .primary-button {
  width: 100%;
}

#booking-form-panel .booking-form {
  row-gap: 14px;
}

#booking-form-panel .booking-form-footer {
  display: grid;
  gap: 10px;
  min-width: 0;
}

/* Keep consent below the shared bottom edge of the two form columns. */
@media (min-width: 721px) {
  #booking-form-panel .booking-form {
    align-items: stretch;
  }

  #booking-form-panel .booking-form-column {
    display: flex;
    flex-direction: column;
  }

  #booking-form-panel .contact-telegram-field {
    margin-top: auto;
  }

  #booking-form-panel .comment-field {
    display: flex;
    flex-direction: column;
    flex: 1;
  }

  #booking-form-panel .comment-field textarea {
    flex: 1;
    min-height: 96px;
    width: 100%;
  }

  #booking-form-panel .booking-form-footer {
    grid-column: 2;
  }
}

#booking-form-panel .comment-toggle-button,
#booking-form-panel .booking-telegram-opt-in {
  min-height: 50px;
  padding: 11px 13px;
  border: 1px solid var(--booking-form-input-border-color);
  border-radius: 12px;
  background: var(--booking-form-input-background);
  color: var(--booking-form-label-color);
}

#booking-form-panel .booking-telegram-opt-in {
  font-size: 14px;
  font-weight: 650;
}

#booking-form-panel .booking-telegram-opt-in:has(input:checked) {
  border-color: var(--ring);
  background: color-mix(in srgb, var(--ring) 14%, var(--booking-card-background));
}

#booking-form-panel .booking-consent {
  font-size: max(12px, calc(var(--booking-form-consent-font-size) * 1px));
  line-height: 1.5;
  text-align: center;
}

#booking-form-panel .booking-consent a {
  color: inherit;
  text-decoration-color: var(--ring);
  text-underline-offset: 3px;
}

#booking-form-panel .field.invalid .field-error {
  display: block;
  margin-top: 6px;
  color: var(--destructive);
  font-size: 12px;
}

.booking-page button:focus-visible,
.booking-page a:focus-visible,
#booking-form-panel .primary-button:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 3px;
}

#booking-form-panel input:not([type="checkbox"]):not([type="hidden"]):not(.booking-honeypot):focus,
#booking-form-panel textarea:focus,
#booking-form-panel select:focus {
  border-color: var(--ring);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ring) 14%, transparent);
  outline: 0;
}

#booking-form-panel .booking-telegram-opt-in:has(input:focus-visible) {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ring) 14%, transparent);
}

.booking-page .booking-modal-dialog {
  border-radius: 28px;
  background: var(--booking-success-modal-background);
  max-height: calc(100dvh - 48px);
  overflow-y: auto;
}

/* Original icons from the new website's icon set; masks inherit UI colors. */
.booking-page .calendar-month-label,
#booking-form-panel .booking-form-section-title,
#booking-form-panel .comment-toggle-button,
#booking-form-panel .primary-button {
  display: flex;
  align-items: center;
  gap: 10px;
}

#booking-form-panel .primary-button { justify-content: center; }

.booking-page .calendar-month-label::before,
.booking-page .time-option::before,
#booking-form-panel .booking-form-section-title::before,
#booking-form-panel .comment-toggle-button::before,
#booking-form-panel .primary-button::before,
.booking-page .booking-info-icon,
.booking-page .booking-back-icon,
.booking-page .calendar-nav-arrow {
  content: "";
  display: inline-block;
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: currentColor;
  mask: var(--booking-icon) center / contain no-repeat;
  -webkit-mask: var(--booking-icon) center / contain no-repeat;
}

.booking-page .calendar-month-label::before {
  --booking-icon: url('/icons/booking/calendar-03.svg');
  color: var(--primary);
  flex-basis: 24px;
  width: 24px;
  height: 24px;
}

.booking-page .time-option { gap: 10px; }
.booking-page .time-option::before { --booking-icon: url('/icons/booking/clock-01.svg'); }
#booking-form-panel .booking-form-contacts-title::before { --booking-icon: url('/icons/booking/user.svg'); }
#booking-form-panel .booking-form-company-title::before { --booking-icon: url('/icons/booking/building-01.svg'); }
#booking-form-panel .booking-form-section-title::before { color: var(--booking-form-label-color); }
#booking-form-panel .comment-toggle-button::before { --booking-icon: url('/icons/booking/chat.svg'); }
#booking-form-panel .primary-button::before { --booking-icon: url('/icons/booking/calendar-add-01.svg'); }
.booking-page .booking-info-icon { --booking-icon: url('/icons/booking/information-circle.svg'); }
.booking-page .booking-back-icon { --booking-icon: url('/icons/booking/arrow-left-02.svg'); color: var(--primary); }
.booking-page .calendar-nav-arrow { --booking-icon: url('/icons/booking/arrow-right-01.svg'); transform: none; }
.booking-page .calendar-nav-button.is-previous .calendar-nav-arrow { --booking-icon: url('/icons/booking/arrow-left-01.svg'); transform: none; }

#booking-form-panel .info-tooltip {
  background: transparent;
  color: var(--booking-form-label-color);
  cursor: url('/icons/booking/cursor-info-02.svg') 5 2, help;
}

@media (max-width: 720px) {
  .booking-page .booking-shell { padding: 16px 12px 32px; }
  .booking-page .calendar-weekdays,
  .booking-page .calendar-grid { gap: 4px; }
  .booking-page .date-option { min-width: 0; padding-inline: 0; }
  #booking-form-panel .booking-form { gap: 24px; }
  body.booking-page #booking-form-panel { padding: 24px 20px; border-radius: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .booking-page *, .booking-page *::before, .booking-page *::after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}
