/* Rezervační kalendář [jhds_booking]. Přebarvení: --jhds-booking-accent na .jhds-booking. */
.jhds-booking {
  --jhds-booking-accent: #1f2937;
  --jhds-booking-muted: #9ca3af;
  --jhds-booking-error: #b91c1c;
  max-width: 32rem;
}

.jhds-booking button {
  cursor: pointer;
  font: inherit;
}

.jhds-booking button:disabled {
  cursor: not-allowed;
  opacity: 0.4;
}

.jhds-booking button:focus-visible {
  outline: 2px solid var(--jhds-booking-accent);
  outline-offset: 2px;
}

.jhds-booking__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.jhds-booking__title {
  margin: 0;
  font-weight: 600;
  text-transform: capitalize;
}

.jhds-booking__nav {
  padding: 0.25rem 0.75rem;
  border: 1px solid var(--jhds-booking-accent);
  border-radius: 0.25rem;
  background: none;
  color: var(--jhds-booking-accent);
}

.jhds-booking__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.25rem;
  text-align: center;
}

.jhds-booking__wd {
  font-size: 0.8em;
  color: var(--jhds-booking-muted);
}

.jhds-booking__day {
  padding: 0.5rem 0;
  border: 1px solid transparent;
  border-radius: 0.25rem;
  background: none;
  color: var(--jhds-booking-muted);
}

.jhds-booking__day.is-available {
  border-color: var(--jhds-booking-accent);
  color: var(--jhds-booking-accent);
  font-weight: 600;
}

.jhds-booking__day[aria-pressed="true"],
.jhds-booking__day.is-available:hover,
.jhds-booking__time:hover {
  background: var(--jhds-booking-accent);
  color: #fff;
}

.jhds-booking__times {
  margin-top: 1rem;
}

.jhds-booking__time-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.jhds-booking__time {
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--jhds-booking-accent);
  border-radius: 0.25rem;
  background: none;
  color: var(--jhds-booking-accent);
}

/* Vybraný čas: zdvojená třída přebije styly tlačítek ze šablony webu. */
.jhds-booking .jhds-booking__time[aria-pressed="true"] {
  border-color: var(--jhds-booking-accent);
  background: var(--jhds-booking-accent);
  color: #fff;
  font-weight: 600;
}

.jhds-booking__form {
  margin-top: 1rem;
}

.jhds-booking__form label {
  display: block;
  font-weight: 600;
}

.jhds-booking__form .jhds-booking__consent {
  font-weight: normal;
}

.jhds-booking__form input[type="text"],
.jhds-booking__form input[type="email"],
.jhds-booking__form input[type="tel"],
.jhds-booking__form textarea {
  width: 100%;
  box-sizing: border-box;
}

.jhds-booking__info {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.9em;
}

.jhds-booking__error {
  display: block;
  color: var(--jhds-booking-error);
  font-size: 0.9em;
}

.jhds-booking__hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.jhds-booking__status {
  margin-top: 0.75rem;
}

.jhds-booking__status:empty {
  display: none;
}

/* Modal po odeslání: vlastní barvy, aby ho nepřebarvila šablona webu. */
.jhds-booking__dialog {
  box-sizing: border-box;
  width: min(28rem, calc(100vw - 2rem));
  padding: 1.5rem;
  border: none;
  border-radius: 0.5rem;
  background: #fff;
  color: #1f2937;
  box-shadow: 0 10px 30px rgb(0 0 0 / 0.25);
}

.jhds-booking__dialog::backdrop {
  background: rgb(0 0 0 / 0.5);
}

.jhds-booking__dialog p {
  margin: 0 0 1rem;
}

.jhds-booking__dialog .jhds-booking__dialog-title {
  margin-bottom: 0.5rem;
  font-size: 1.25em;
  font-weight: 700;
}

.jhds-booking__dialog form {
  margin: 0;
  text-align: right;
}

.jhds-booking .jhds-booking__dialog-close {
  padding: 0.5rem 1.25rem;
  border: 1px solid var(--jhds-booking-accent);
  border-radius: 0.25rem;
  background: var(--jhds-booking-accent);
  color: #fff;
}
