:root {
  --rect_background: #FFFFFF;
  --rect_primary: #D9A59F;
  --rect_dark: #424242;
  --rect_medium: #757575;
  --rect_light: #BDBDBD;
  --rect_border: #E0E0E0;
  --rect_font-family: Poppins, sans-serif;
}

.rect-appointment-form {
  width: 100%;
  max-width: 1400px;
  display: block;
  margin-left: auto;
  margin-right: auto;
  font-family: var(--rect_font-family);
  color: var(--rect_dark);
  position: relative;
}

.rect-appointment-form.loading {
  pointer-events: none;
}

.rect-appointment-form.loading > * {
  opacity: .45;
  filter: brightness(1.12) contrast(.92);
  transition: opacity .2s ease, filter .2s ease;
}

.rect-appointment-form.loading::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(255,255,255,.75), rgba(255,255,255,.65));
  backdrop-filter: blur(1px);
  z-index: 10;
}

.rect-appointment-form.loading::after {
  content: "";
  position: absolute;
  z-index: 11;
  top: 50%;
  left: 50%;
  width: 44px;
  height: 44px;
  margin: -22px 0 0 -22px;
  border-radius: 50%;
  border: 3px solid rgba(0,0,0,.15);
  border-top-color: var(--rect_primary);
  animation: rect-spin 0.9s linear infinite;
  box-shadow: 0 0 0 6px rgba(255,255,255,.65);
}

@keyframes rect-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .rect-appointment-form.loading::after {
    animation: none;
  }
}

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

.rect-appointment-form * {
  box-sizing: border-box;
}

.rect-appointment-form h1, .rect-appointment-form h2, .rect-appointment-form h3, .rect-appointment-form h4, .rect-appointment-form h5, .rect-appointment-form h5, .rect-appointment-form button, .rect-appointment-form input, .rect-appointment-form textarea {
  font-family: var(--rect_font-family);
}

.rect-steps {
  display: flex;
  justify-content: space-between;
  position: relative;
}

.rect-steps:before {
  width: 100%;
  height: 1px;
  background-color: var(--rect_light);
  top: 50%;
  left: 0;
  content: "";
  position: absolute;
  z-index: 0;
}

.rect-steps .rect-step {
  background-color: var(--rect_background);
  position: relative;
  z-index: 1;
  padding: 0 10px;
  display: flex;
  gap: 10px;
  color: var(--rect_light);
}

.rect-error {
  font-size: 1em;
  margin-top: 30px;
  margin-bottom: 10px;
}

.rect-steps .rect-step.active, .rect-steps .rect-step.done {
  color: var(--rect_dark);
}

.rect-steps .rect-step:first-child {
  padding-left: 0;
}

.rect-steps .rect-step:last-child {
  padding-right: 0;
}

.rect-steps .rect-step > span {
  width: 2em;
  height: 2em;
  line-height: 2em;
  text-align: center;
  border-radius: 50%;
  border: 1px solid var(--rect_light);
  color: var(--rect_light);
  position: relative;
}

.rect-steps .rect-step.done span > img {
  width: 80%;
  height: auto;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translateX(-50%) translateY(-50%);
}

.rect-steps .rect-step.active > span {
  color: var(--rect_background);
  background-color: var(--rect_primary);
  border-color: var(--rect-primary);
}

.rect-steps .rect-step > div {
  font-size: 0.85em;
}

.rect-steps .rect-step > div > strong {
  font-size: 1.25em;
}

.rect-step-title {
  display: block;
  margin-bottom: 30px;
  margin-top: 40px;
}

.rect-step-title h4 {
  font-size: 1.3em;
  font-weight: 600;
}

.rect-service-list, .rect-time-list {
  padding: 0;
  margin: 0;
  list-style: none;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

ul.rect-service-list {
  padding-left: 0 !important;
}

.rect-service-list {
  max-height: 550px;
  overflow-y: auto;
}

.rect-service-list li, .rect-time-list li {
  border: 1px solid var(--rect_border);
  width: 100%;
  padding: 20px;
  display: flex;
}

.rect-checkbox-container {
  display: flex;
  position: relative;
  padding-left: 2.75em;
  cursor: pointer;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  gap: 15px;
  width: 100%;
  justify-items: space-between;
}

.rect-checkbox-container input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.rect-checkbox-container .rect-checkmark {
  position: absolute;
  top: 0;
  left: 0;
  height: 1.5em;
  width: 1.5em;
  background-color: var(--rect_backgorund);
  border: 1px solid var(--rect_border);
  -webkit-transition: all .2s ease-in-out;
	-moz-transition: all .2s ease-in-out;
	-o-transition: all .2s ease-in-out;
	transition: all .2s ease-in-out;
}

.rect-checkbox-container:hover input ~ .rect-checkmark {
  background-color: var(--rect_border);
}

.rect-checkbox-container input:checked ~ .rect-checkmark {
  background-color: var(--rect_primary);
}

.rect-checkbox-container .rect-checkmark:after {
  content: "";
  position: absolute;
  display: none;
}

.rect-checkbox-container input:checked ~ .rect-checkmark:after {
  display: block;
}

.rect-checkbox-container .rect-checkmark:after {
  left: 50%;
  top: 50%;
  margin-left: -3px;
  margin-top: -3px;
  width: 6px;
  height: 6px;
  background-color: var(--rect_background);
}

.rect-service-name {
  font-weight: 600;
  width: calc(100% - 70px);
}

.rect-service-time {
  color: var(--rect_light);
  font-size: 0.85em;
  padding-top: 0.3em;
  width: 70px;
}

.rect-bottom-navigation {
  display: flex;
  width: 100%;
  margin-top: 45px;
  justify-content: space-between;
}

.rect-bottom-navigation button {
  padding: 1em 1.75em;
  letter-spacing: 2px;
  font-size: 0.85em;
  text-transform: uppercase;
  text-align: center;
  color: var(--rect_dark);
  background-color: var(--rect_background);
  border: 1px solid var(--rect_dark);
  -webkit-transition: all .2s ease-in-out;
	-moz-transition: all .2s ease-in-out;
	-o-transition: all .2s ease-in-out;
	transition: all .2s ease-in-out;
  cursor: pointer;
  outline: none;
}

.rect-bottom-navigation button.rect-next {
  background-color: var(--rect_dark);
  color: var(--rect_background);
}

.rect-bottom-navigation button.rect-next:hover {
  background-color: var(--rect_primary);
  color: var(--rect_background);
  border-color: var(--rect_primary);
}

.rect-doctor-list {
  display: flex;
  width: 100%;
  flex-wrap: wrap;
  gap: 10px;
}

.rect-doctor-list button {
  width: calc(20% - 8px);
  border: 1px solid var(--rect_border);
  padding: 20px;
  background-color: var(--rect_background);
  -webkit-transition: all .2s ease-in-out;
	-moz-transition: all .2s ease-in-out;
	-o-transition: all .2s ease-in-out;
	transition: all .2s ease-in-out;
  cursor: pointer;
  font-weight: 600;
  outline: none;
}

.rect-doctor-list button:hover, .rect-doctor-list button.active {
    background-color: var(--rect_primary);
    color: var(--rect_background);
    border-color: var(--rect_primary);
}

.rect-appointment-form input[type="text"], .rect-appointment-form input[type="email"], .rect-appointment-form input[type="tel"], .rect-appointment-form textarea {
  border: 1px solid var(--rect_border);
  padding: 20px;
  background-color: var(--rect_background);
}

input[type="text"].flatpickr {
    background-image: url('https://cdn-icons-png.flaticon.com/512/747/747310.png');
    background-size: 16px 16px;
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 30px;
    cursor: pointer;
}

.rect-date-picker {
  display: block;
  margin-bottom: 10px;
}

.rect-time-list li {
  justify-content: space-between;
  flex-wrap: wrap;
  align-items: center;
}

.rect-time-list button, .rect-wariant-sciezki {
  padding: 15px 30px;
  background-color: var(--rect_primary);
  color: var(--rect_background);
  font-weight: 600;
  -webkit-transition: all .2s ease-in-out;
	-moz-transition: all .2s ease-in-out;
	-o-transition: all .2s ease-in-out;
	transition: all .2s ease-in-out;
  border: none;
  cursor: pointer;
  outline: none;
}

.rect-wariant-sciezki {
  margin-top: 30px;
  margin-bottom: 10px;
  margin-right: 10px;
}

.rect-time-list button:hover, .rect-wariant-sciezki:hover, .rect-time-list button.active, .rect-wariant-sciezki.active {
  background-color: var(--rect_dark);
    color: #FFF;
    border-color: var(--rect_dark);
    }

.rect-personal-form {
  display: flex;
  gap: 20px 10px;
  flex-wrap: wrap;
}

.rect-personal-form .rect-form-column {
  width: calc(50% - 5px);
}

.rect-form-column label, .rect-form-column input, .rect-form-column textarea {
  width: 100%;
  display: block;
}

.rect-form-column label {
  font-size: 0.85em;
  margin-bottom: 10px;
}

table.rect-summary {
  border: none;
}

table.rect-summary td {
  padding: 10px 20px;
}

table.rect-summary tr td:first-child {
  padding-left: 0;
}

table.rect-summary tr td:last-child {
  padding-right: 0;
  font-weight: 600;
  padding-left: 50px;
}

@media (max-width: 980px) {
  .rect-doctor-list button {
    width: calc(25% - 7.5px);
  }
}

@media (max-width: 800px) {
  .rect-doctor-list button {
    width: calc(33.33% - 6.7px);
  }

  .rect-steps .rect-step > div {
    display: none;
  }
}

@media (max-width: 640px) {
  table.rect-summary tr td:last-child {
    padding-left: 30px;
  }

  .rect-personal-form .rect-form-column {
    width: 100%;
  }

  .rect-time-list button {
    order: 3;
    width: 100%;
    margin-top: 10px;
  }

  input[type="text"].flatpickr {
    width: 100%;
  }

  .rect-doctor-list button {
    width: 100%;
  }
  
  .rect-wariant-sciezki {
    margin-top: 10px;
    width: 100%;
    ]
}


.flatpickr-day.termin-dostepny {
  background-color: var(--rect_primary);
}

.flatpickr-calendar.loading .flatpickr-innerContainer,
.flatpickr-calendar.loading .flatpickr-months,
.flatpickr-calendar.loading .flatpickr-weekdays {
  opacity: 0.4;
  pointer-events: none;
}

.flatpickr-calendar.loading::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(255, 255, 255, 0.5);
  z-index: 20;
}

.flatpickr-calendar.loading::before {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 24px; height: 24px;
  margin: -12px 0 0 -12px;
  border: 3px solid #ccc;
  border-top: 3px solid #333;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  z-index: 21;
}

@keyframes spin {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.rect-warianty-sciezki {
  margin-top: 15px;
}