/* NOTVIN — appointment widget: free time slots and result states. */
.slots-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.slots-refresh {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  margin: 0;
  padding: 0 12px 0 10px;
  border: 1px solid var(--line, #d9d2c5);
  border-radius: 999px;
  background: transparent;
  color: var(--muted, #6f6a61);
  font: inherit;
  font-size: 12.5px;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color .15s ease, color .15s ease, background-color .15s ease;
}

.slots-refresh:hover {
  border-color: var(--copper, #a2663f);
  color: var(--navy, #1c2b3a);
  background: var(--white, #fff);
}

.slots-refresh:focus-visible {
  outline: 2px solid var(--navy, #1c2b3a);
  outline-offset: 2px;
}

.slots-refresh[disabled] {
  opacity: .7;
  cursor: progress;
}

.slots-refresh__icon {
  width: 14px;
  height: 14px;
  color: var(--copper, #a2663f);
  flex: none;
}

.slots-refresh[disabled] .slots-refresh__icon {
  animation: slots-refresh-spin .9s linear infinite;
}

@keyframes slots-refresh-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .slots-refresh[disabled] .slots-refresh__icon { animation: none; }
}

.slots-area { display: flex; flex-direction: column; gap: 6px; }
.slots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(74px, 1fr));
  gap: 7px;
  margin-top: 2px;
}

.slots__hint {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted, #6f6a61);
  font-size: 14px;
  line-height: 1.5;
}

.slot {
  appearance: none;
  border: 1px solid var(--line, #d9d2c5);
  background: var(--paper, #fffdf8);
  color: var(--ink, #1c2b3a);
  border-radius: 7px;
  min-height: 42px;
  padding: 8px 6px;
  font: inherit;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}

.slot:focus-visible {
  border-color: var(--copper, #a2663f);
}

.slot:focus-visible {
  outline: 2px solid var(--navy, #1c2b3a);
  outline-offset: 2px;
}

.slot--selected {
  background: var(--navy, #1c2b3a);
  border-color: var(--navy, #1c2b3a);
  color: #fffdf8;
}


.slots__retry {
  grid-column: 1 / -1;
  justify-self: start;
  min-height: 42px;
  padding: 4px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--ivory);
  color: var(--navy);
  font-size: 14px;
}

.form__submit[disabled] {
  opacity: 0.48;
  cursor: not-allowed;
}

.form__submit[disabled]:hover {
  transform: none;
}

/* Both columns share their outer edges. The form uses its natural height;
   the map absorbs the remaining height without detaching from the contacts. */
.booking__grid { gap: clamp(24px, 3.4vw, 48px); }
.booking__card, .form-host, .appointment-office, .appointment-office .contacts-map {
  display: flex;
  flex-direction: column;
}
.booking__card { padding: clamp(20px, 2vw, 30px); }
.form-host, .form-host > .form, .form-result:not([hidden]) { flex: 1; }
.form-host > .form { gap: clamp(14px, 1.2vw, 18px); }
.form-result:not([hidden]) { display: flex; flex-direction: column; }
.form__submit, .form-result__again { margin-top: auto; }
.form-result__status:not(:empty) { margin-bottom: 18px; }
.form-result__echo { margin-bottom: 16px; }
.field, .field-row > *, .field__control { min-width: 0; }
.field-row { align-items: start; }
#field-slots { padding-bottom: clamp(16px, 1.5vw, 22px); border-bottom: 1px solid var(--line); }
.slots {
  align-content: start;
  max-block-size: 24rem;
  overflow-y: auto;
}
.slots :focus-visible { outline-offset: -3px; }
.slot--selected:focus-visible { outline-color: var(--ivory); }
.slot, .slots__retry { min-height: 44px; }
.appointment-office {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--ivory);
}
.appointment-office__details { padding: clamp(19px, 2vw, 28px) clamp(18px, 2vw, 28px) 6px; }
.appointment-office .contacts { margin-top: 15px; }
.appointment-office .contacts__row { padding-block: 9px; }
.appointment-office .contacts__row:last-child { border: 0; }
.appointment-office .contacts-map {
  flex: 1;
  container-type: inline-size;
  margin: 0;
  border-width: 1px 0 0;
  border-radius: 0;
}
.appointment-office .contacts-map__stage { flex: 1; min-block-size: max(145px, 44cqw); aspect-ratio: auto; }
.appointment-office .map-preview { container-type: size; }
.appointment-office .map-preview__drawing { width: max(100cqw, 66.67cqh); }
.appointment-office .contacts-map__caption { padding: 10px clamp(10px, 1.3vw, 18px); gap: 4px 10px; }
.no-js .booking__grid { grid-template-columns: minmax(0, 1fr); }
.no-js .booking__card { padding-block: 14px; box-shadow: none; }
.form-fallback a { white-space: nowrap; }
@media (min-width: 761px) {
  .no-js .appointment-office { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
  .no-js .appointment-office .contacts-map { border-width: 0 0 0 1px; }
}
@media (760px < width <= 900px) {
  .appointment-office { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); }
  .appointment-office__details { padding-bottom: 12px; }
  .appointment-office .contacts-map { border-width: 0 0 0 1px; }
}
@media (600px < width <= 760px) {
  .appointment-office .contacts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; }
  .appointment-office .contacts__row { grid-template-columns: minmax(0, 1fr); align-content: start; gap: 3px; }
  .appointment-office .contacts__row:nth-last-child(2) { border-bottom: 0; }
  .appointment-office .contacts-map__stage { flex: none; min-block-size: 0; aspect-ratio: 2.2; }
}
@media (max-width: 600px) {
  .booking__grid { row-gap: 24px; }
  .appointment-office .contacts-map__stage { flex: none; min-block-size: 0; aspect-ratio: 1.75; }
}
@media (hover: hover) and (pointer: fine) {
  .slot:hover { border-color: var(--copper); }
}
@media (max-width: 600px) {
  .slots { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .slot { min-height: 44px; }
}


/* Reason and comment fields in the booking form. */
.field__optional {
  font-weight: 400;
  color: var(--muted);
}

.field__hint {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--muted);
}

.field__input--area {
  height: auto;
  min-height: 80px;
  max-height: 18rem;
  padding-top: 12px;
  padding-bottom: 12px;
  line-height: 1.5;
  resize: vertical;
}
