.appointment-time-field {
  min-width: 0;
}

.appointment-fault-types {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.appointment-fault-types legend {
  margin-bottom: 8px;
  color: #172033;
  font-size: 14px;
  font-weight: 700;
}

.appointment-fault-types > div {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.appointment-fault-button {
  display: block;
  min-width: 0;
  margin: 0;
  cursor: pointer;
}

.appointment-fault-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.appointment-fault-button span {
  display: flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  border: 1px solid #c8d6e5;
  border-radius: 10px;
  background: #fff;
  color: #164e83;
  font-size: 15px;
  font-weight: 800;
  transition: border-color .16s ease, background .16s ease, color .16s ease, transform .16s ease;
}

.appointment-fault-button:hover span {
  border-color: #2b77b8;
  background: #f1f8ff;
  transform: translateY(-1px);
}

.appointment-fault-button input:focus-visible + span {
  outline: 3px solid rgba(37, 99, 235, .24);
  outline-offset: 2px;
}

.appointment-fault-button.is-selected span,
.appointment-fault-button:has(input:checked) span {
  border-color: #1769aa;
  background: #1769aa;
  color: #fff;
  box-shadow: 0 5px 14px rgba(23, 105, 170, .2);
}

.appointment-time-label {
  display: block;
  margin-bottom: 8px;
  color: #172033;
  font-size: 14px;
  font-weight: 700;
}

.appointment-slot-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(96px, 1fr));
  gap: 9px;
  width: 100%;
  transition: opacity .18s ease;
}

.appointment-slot-grid.is-loading {
  opacity: .45;
  pointer-events: none;
}

.appointment-slot {
  display: block;
  min-width: 0;
  margin: 0;
  cursor: pointer;
}

.appointment-slot input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.appointment-slot span {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 2px;
  border: 1px solid #c8d6e5;
  border-radius: 10px;
  background: #fff;
  color: #164e83;
  box-shadow: 0 1px 2px rgba(22, 78, 131, .06);
  transition: border-color .16s ease, background .16s ease, color .16s ease, transform .16s ease;
}

.appointment-slot b {
  font-size: 16px;
  line-height: 1.15;
  letter-spacing: .02em;
}

.appointment-slot small {
  color: #5d7188;
  font-size: 11px;
  font-weight: 600;
}

.appointment-slot:not(.is-unavailable):hover span {
  border-color: #2b77b8;
  background: #f1f8ff;
  transform: translateY(-1px);
}

.appointment-slot input:focus-visible + span {
  outline: 3px solid rgba(37, 99, 235, .24);
  outline-offset: 2px;
}

.appointment-slot.is-selected span,
.appointment-slot:has(input:checked) span {
  border-color: #1769aa;
  background: #1769aa;
  color: #fff;
  box-shadow: 0 5px 14px rgba(23, 105, 170, .2);
}

.appointment-slot.is-selected small,
.appointment-slot:has(input:checked) small {
  color: #e6f3ff;
}

.appointment-slot.is-unavailable {
  cursor: not-allowed;
}

.appointment-slot.is-unavailable span {
  border-color: #e1e5ea;
  background: #edf0f3;
  color: #929aa5;
  box-shadow: none;
}

.appointment-slot.is-unavailable small {
  color: #9da5ae;
}

.appointment-slot-status {
  min-height: 20px;
  margin: 8px 0 0;
  color: #526579;
  font-size: 13px;
}

.appointment-slot-status.is-warning {
  color: #a14411;
  font-weight: 700;
}

.appointment-slot-status.is-success {
  color: #087443;
  font-weight: 700;
}

.appointment-slot-empty {
  grid-column: 1 / -1;
  border: 1px dashed #cbd5e1;
  border-radius: 9px;
  padding: 18px;
  color: #64748b;
  text-align: center;
}

@media (max-width: 760px) {
  .appointment-fault-button span {
    min-height: 48px;
    padding: 0 4px;
    font-size: 14px;
  }

  .appointment-slot-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
  }

  .appointment-slot span {
    min-height: 54px;
  }

  .appointment-slot b {
    font-size: 15px;
  }
}

@media (max-width: 390px) {
  .appointment-slot-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
