:root {
  --color-white: #fff;
  --color-black: #010101;
  --color-blue-text: #70bcff;
  --color-pink: #f44871;
  --color-pink-hover: #e9255d;
  --color-blue: #007cdb;
  --color-blue-hover: #0265d1;
  --color-gray-text: #6d757d;
  --color-gray: #1f2023;
  --color-gray-card-border: #535a65;
  --color-gray-button-hover: #303236;
  --color-gray-border: #545b66;
  --color-gray-border-input: #a6acbb;
  --color-border-input-focus: #6ebdeb;
  --label-icon: #a2b4cb;
  --color-green: #09aa6e;
  --color-green-hover: #089863;
  --light-gray: #303236;
  --dark-gray: #131416;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", system-ui, sans-serif;
}

body {
  background: var(--color-black);
  color: #f0f9ff;
  min-height: 100vh;
  position: relative;
}

/* Кнопка закрытия (назад) */
.back__button {
  position: fixed;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 11;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
  border-radius: 50%;
  height: 1.5rem;
  width: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-gray);
  color: var(--label-icon);
  cursor: pointer;
  text-decoration: none;
}

.back__button:hover {
  color: var(--color-pink);
}

/* Основной контейнер */
.main-content {
  padding: 20px;
  max-width: 1200px;
  margin: 0 auto;
  padding-bottom: 40px;
}

/* Панель фильтров */
.filters-panel {
  background: var(--color-gray);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 1rem;
  margin-bottom: 30px;
  position: relative;
  z-index: 5;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin-bottom: 0.5rem;
}

.filter-group label {
  color: var(--color-blue-text);
  font-size: 0.95rem;
  font-weight: 600;
}

.filter-group label i {
  font-size: 1.2rem;
  cursor: pointer;
  margin-left: 0.3rem;
  color: var(--label-icon);
}

.filter-group label i:hover {
  color: var(--color-pink);
}

.filter-select {
  padding: 12px 15px;
  background: var(--color-gray-button-hover);
  border: 3px solid var(--color-gray-border-input);
  border-radius: 1rem;
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  font-weight: bold;
}

.filter-select:focus {
  outline: none;
  border: 3px solid var(--color-border-input-focus);
}

input {
  width: 100%;
  padding: 1rem;
  border: 2px solid var(--color-gray-border-input);
  background: var(--color-gray-button-hover);
  border-radius: 1rem;
  font-size: 1.2rem;
  color: #fff;
  font-weight: 600;
}

input:focus {
  outline: none;
  border: 3px solid var(--color-border-input-focus);
  padding: 15px;
}

/* Общая кнопка */
.button {
  text-align: center;
  margin-top: 1rem;
  width: 15rem;
  padding: 0.5rem 1rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--color-blue);
  color: white;
}

.button:hover {
  background: var(--color-blue-hover);
}

/* Блок свободных окон */
.windows-container {
  background: var(--color-gray);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 0.5rem;
  border: 1px solid var(--color-gray-border);
  position: relative;
}

.windows-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-direction: column;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--color-gray-border);
}

.windows-title {
  font-size: 1.4rem;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Навигация по неделям */
.nav_date_btns {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav_date_btns a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: bold;
  transition: all 0.2s ease;
  background: var(--color-blue);
  margin: 0.5rem;
}

.nav_date_btns a:hover {
  background: var(--color-blue-hover);
}

.nav_date_btns a i {
  font-size: 16px;
}

/* Сетка окон */
.windows-grid {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.windows-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-direction: row;
  width: 100%;
  border-bottom: 1px solid var(--color-gray-border);
  padding: 1rem 0;
}

.windows-row-date {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  width: 3rem;
  height: 3rem;
  border-radius: 0.5rem;
  font-weight: bold;
  font-size: 1rem;
  margin-right: 0.5rem;
  flex-shrink: 0;
  margin-right: 1.3rem;
}

.dateWeek {
  font-size: 0.9rem;
}

.month {
  font-weight: 600;
  font-size: 0.8rem;
}

.windows-row-windows {
  border-left: 2px solid var(--color-gray-border);
  padding-left: 1rem;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
}

.time-slot {
  background: var(--color-pink);
  margin: 0.3rem;
  border-radius: 0.3rem;
  font-weight: bold;
  padding: 0.2rem 0.5rem;
  cursor: pointer;
}

.time-slot:hover {
  background: var(--color-pink-hover);
}

/* Мультиселект услуг */
.multiselect-container {
  position: relative;
  width: 100%;
  margin-top: 1rem;
}

.multiselect-box {
  padding: 10px 10px 10px 45px;
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  width: 100%;
  background: var(--color-gray-button-hover);
  border: 3px solid var(--color-gray-border-input);
  border-radius: 1rem;
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  font-weight: bold;
}

.multiselect-box:hover {
  border: 3px solid var(--color-border-input-focus);
}

.multiselect-box.active {
  border-color: var(--color-pink-hover);
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.placeholder {
  color: #fff;
  padding: 5px 0px;
}

.selected-item {
  background-color: var(--color-blue-hover);
  color: white;
  padding: 5px 12px;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
}

.remove-btn {
  text-align: center;
  background: none;
  border: none;
  color: var(--color-pink);
  font-weight: bold;
  cursor: pointer;
  font-size: 1.1rem;
  padding: 0;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-weight: bold;
  line-height: 1;
}

.remove-btn::before {
  content: '×';
  transform: translateY(-2px); /* подберите значение (±1px) */
}

.remove-btn:hover {
  background-color: var(--color-pink);
  color: #fff;
}

.dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--color-gray);
  border: 3px solid var(--color-gray-border-input);
  border-top: none;
  border-radius: 12px;
  max-height: 300px;
  overflow-y: auto;
  z-index: 100;
  display: none;
}

.dropdown.active {
  display: block;
}

.search-container {
  padding: 12px;
  position: sticky;
  top: 0;
  background: var(--color-gray);
  z-index: 10;
}

.options-container {
  padding: 5px 0;
}

.option {
  padding: 12px 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: bold;
}

.option:hover {
  color: var(--color-pink);
}

.option.selected {
  background: var(--color-blue);
}

.checkbox {
  width: 18px;
  height: 18px;
  border: 2px solid #fff;
  background: var(--color-gray);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.checkbox.checked::after {
  content: "✓";
  color: var(--color-blue-text);
  font-weight: bold;
}

.option-text {
  flex-grow: 1;
}

.no-results {
  padding: 20px;
  text-align: center;
  color: #7f8c8d;
}

.counter,
.time_sum,
.price_sum {
  margin-left: auto;
  color: var(--color-blue-text);
  font-size: 0.9rem;
  position: absolute;
  top: -1.5rem;
  font-weight: bold;
}

.counter {
  left: 0.5rem;
}

.time_sum {
  right: 0.5rem;
}

.price_sum {
  right: 6.5rem;
}

.option-disabled,
.option[aria-disabled="true"] {
  opacity: 0.3;
  pointer-events: none;
  cursor: not-allowed;
}

/* Общий стиль для иконок внутри полей */
.input-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-pink);
  z-index: 2;
}

/* Модальное окно записи */
.booking-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.booking-modal.active {
  display: flex;
}

.modal-content-record {
  background: var(--color-gray);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  padding: 0.5rem 0.5rem;
  max-width: 500px;
  width: 100%;
  border: 1px solid var(--color-gray-border);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  position: relative;
}

.modal-header {
  margin-bottom: 1rem;
  padding-left: 0.5rem;
}

.modal-header h3 {
  color: #fff;
  font-size: 1.2rem;
}

.from_to_time {
  font-weight: bold;
  font-size: 0.9rem;
  color: var(--color-blue-text);
}

.btn-close-circle {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
  position: absolute;
  top: 0.3rem;
  right: 0.3rem;
  border-radius: 50%;
  height: 1.5rem;
  width: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-gray);
  color: var(--label-icon);
  cursor: pointer;
}

.btn-close-circle:hover {
  color: var(--color-pink);
}

/* Форма в модальном окне */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  color: var(--color-blue-text);
  margin-bottom: 8px;
  font-weight: bold;
}

.input-wrapper {
  position: relative;
}

.input-wrapper input,
.input-wrapper select,
.input-wrapper textarea {
  width: 100%;
  padding: 15px 15px 15px 45px;
  background: var(--color-gray-button-hover);
  border: 2px solid var(--color-gray-border-input);
  border-radius: 1rem;
  color: #fff;
  font-size: 1rem;
}

.input-wrapper input:focus {
  outline: none;
  border: 3px solid var(--color-border-input-focus);
  padding: 15px 15px 15px 45px;
}

.btn-save {
  width: 100%;
  padding: 16px 20px;
  background: var(--color-blue);
  color: white;
  border: none;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.btn-save:hover {
  background: var(--color-blue-hover);
}

.btn-save:disabled {
    background-color: #ccc;
    color: #666;
    cursor: not-allowed;
}

/* Модальное окно подтверждения */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-success {
  background: var(--color-gray);
  border: 1px solid var(--color-gray-border-input);
  border-radius: 1rem;
  max-width: 450px;
  width: 100%;
  padding: 40px 30px;
  position: relative;
  transform: scale(0.7) translateY(50px);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
}

.modal-overlay.active .modal-success {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.modal-close {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
  position: absolute;
  top: 0.3rem;
  right: 0.3rem;
  border-radius: 50%;
  height: 1.5rem;
  width: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-gray);
  color: var(--label-icon);
  cursor: pointer;
}

.modal-close:hover {
  color: var(--color-pink);
}

.success-icon {
  width: 100px;
  height: 100px;
  margin: 0 auto 25px;
  background: var(--color-blue);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: bounceIn 0.6s;
}

.success-icon svg {
  width: 50px;
  height: 50px;
  fill: white;
}

.modal-title {
  text-align: center;
  color: #fff;
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 15px;
}

.modal-message {
  text-align: center;
  color: #fff;
  font-size: 16px;
  line-height: 1.3;
  margin-bottom: 30px;
}

.appointment-details {
  background: var(--color-gray-button-hover);
  border-radius: 20px;
  padding: 20px;
  margin-bottom: 30px;
  border: 1px solid var(--color-border-input-focus);
}

.detail-item {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
  color: var(--color-blue-text);
}

.detail-item:last-child {
  margin-bottom: 0;
}

.detail-icon {
  width: 40px;
  height: 40px;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 15px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.detail-icon svg {
  width: 20px;
  height: 20px;
  fill: var(--color-pink);
}

.detail-text {
  flex: 1;
}

.detail-label {
  font-size: 12px;
  color: var(--color-blue-text);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.detail-value {
  font-size: 16px;
  font-weight: 600;
  color: #fff;
}

.modal-button {
  background: var(--color-blue);
  color: white;
  border: none;
  padding: 15px 30px;
  font-size: 18px;
  font-weight: 600;
  border-radius: 1rem;
  width: 100%;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.modal-button:hover {
  background: var(--color-blue-hover);
}

.modal-button:active {
  transform: translateY(0);
}

/* Анимации */
@keyframes bounceIn {
  0% {
    transform: scale(0.3);
    opacity: 0;
  }
  50% {
    transform: scale(1.05);
  }
  70% {
    transform: scale(0.9);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Медиа-запросы */
@media (max-width: 768px) {
  .nav_date_btns a {
    padding: 10px 15px;
    font-size: 13px;
  }
}

@media (max-width: 600px) {
  .multiselect-box {
    min-height: 45px;
  }
  .selected-item {
    font-size: 0.85rem;
    padding: 4px 10px;
  }
}

@media (max-width: 480px) {
  .main-content {
    padding: 0px;
    padding-top: 3rem;
  }
  .windows-grid {
    grid-template-columns: 1fr;
  }
  .modal-success {
    padding: 30px 20px;
  }
  .modal-title {
    font-size: 24px;
  }
  .success-icon {
    width: 80px;
    height: 80px;
  }
  .success-icon svg {
    width: 40px;
    height: 40px;
  }
  .detail-item {
    flex-direction: column;
    text-align: center;
  }
  .detail-icon {
    margin-right: 0;
    margin-bottom: 10px;
  }
}

@media (max-width: 360px) {
  .modal-success {
    padding: 25px 15px;
  }
  .modal-title {
    font-size: 22px;
  }
  .modal-message {
    font-size: 14px;
  }
  .modal-button {
    padding: 12px 20px;
    font-size: 16px;
  }
}

@keyframes border-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 0, 0, 0.5);
  }
  50% {
    box-shadow: 0 0 20px 5px rgba(255, 0, 0, 0.8);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 0, 0, 0);
  }
}

.border-attention {
  animation: border-pulse 1s infinite; /* бесконечное мигание */
}

/* ------------------------------------------------------------------------------------------- */

/* Затемнённый фон */
.custom-alert-overlay {
  display: none;
  position: fixed;
  top: -100000;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(12px);
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* Класс для отображения */
.custom-alert-overlay.show {
  display: flex;
  opacity: 1;
  top: 0;
}

/* Контейнер модального окна */
.custom-alert-container {
  background-color: var(--color-gray);
  border-radius: 12px;
  border: 1px solid var(--color-gray-border);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  width: 90%;
  max-width: 400px;
  transform: scale(0.9);
  transition: transform 0.3s ease;
  overflow: hidden;
}

.custom-alert-overlay.show .custom-alert-container {
  transform: scale(1);
}

/* Заголовок */
.custom-alert-header {
  padding: 16px 20px;
  background-color: var(--color-gray);
  border-bottom: 1px solid var(--color-gray-border);
}

.custom-alert-header h3 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--color-pink);
}

/* Тело сообщения */
.custom-alert-body {
  padding: 20px;
  color: #fff;
  font-size: 1rem;
  font-weight: bold;
  line-height: 1.5;
}

.custom-alert-body p {
  margin: 0;
}

/* Подвал с кнопкой */
.custom-alert-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--color-gray-border);
  text-align: right;
}

.custom-alert-button {
  background-color: var(--color-blue);
  color: white;
  border: none;
  padding: 8px 24px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.custom-alert-button:hover {
  background-color: var(--color-blue-hover);
}

