html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;         /* запрещаем scroll у документа */
  position: relative;       /* убираем fixed */
  touch-action: none;       /* запрещаем свайпы Telegram */
}




body {
  position: relative;
  overflow-x: hidden;
  overflow-y: auto;
  color: #1f2937;
  min-height: 100vh;
  font-family: 'Inter', sans-serif;
  z-index: 0;
}

/* 👇 Добавляем фиксированный фон */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('Imagefon.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed; /* можно оставить, вдруг сработает */
  background-color: #000;
  z-index: -1;
}

  
  .container {
    max-width: 100%;
    width: 100vw;
    padding: 0;
    margin: 0;
    background: none; /* убираем фон */
    box-shadow: none; /* если был */
    height: 100vh;
    overflow-y: auto;                         /* ✅ тут будет скролл */
    -webkit-overflow-scrolling: touch;  
  }

  
  /* Шапка */
  .header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
  }
  
  .title {
    font-size: 28px;
    font-weight: 700;
  }
  
  .primary-btn {
    background-color: #6366f1;
    color: white;
    padding: 9px 16px;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s ease, transform 0.1s ease;
  }
  
  .primary-btn:hover {
    background-color: #4f46e5;
  }
  
  .primary-btn:active {
    transform: scale(0.96);
  }


  .modal-content .primary-btn {
    margin-top: 8px;
    display: block;
    width: 100%;
  }


  
  /* Карточка панели */
  .panel {
    padding: 0 12px;
    margin: 0;
    background: none;
    box-shadow: none;
    border: none;
  }
  
  .panel:hover {
    transform: translateY(-2px);
  }
  
  /* Услуги */
  
.service-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* 2 карточки в ряд */
  gap: 16px;
}


.service-card {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;

  min-height: 270px;              /* ← гарантирует высоту */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}



.service-card:hover {
  transform: translateY(-4px);
}

.service-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}


.service-card .service-info {
  padding: 16px 12px;
  text-align: center;

  flex-grow: 1;                         /* ← занимает доступное пространство */
  display: flex;
  flex-direction: column;
  justify-content: space-between;      /* ← равномерное распределение */
}


.service-name {
  font-weight: 700;
  font-size: 16px;
  color: #ffffff;
}

.service-price {
  font-size: 14px;
  color: #d1d5db;
}


.service-card:active {
  transform: scale(0.97);
  box-shadow: 0 4px 14px rgba(0,0,0,0.2);
}


.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;      /* по вертикали */
  justify-content: center;  /* по горизонтали */
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
}



.modal-content {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 16px;
  padding: 20px;
  width: 90%;
  max-width: 360px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  color: white;
  text-align: center;
  animation: fadeInScale 0.3s ease;
}

.modal-content h2 {
  font-size: 20px;
  font-weight: 700;
  margin: 12px 0 6px;
  color: #ffffff;
}

.modal-content p {
  font-size: 14px;
  color: #d1d5db;
  margin: 6px 0;
}

.modal-content img {
  width: 100%;
  height: 333px; /* БЫЛО: 200px */
  max-height: 333px;
  object-fit: cover;
  border-radius: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 12px;
}



.modal.hidden {
  display: none;
}




@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}



.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  margin-top: 8px;
  margin-bottom: 6px;
  font-weight: 600;
  color: #e0e7ff;
  font-size: 13px;
  text-align: center;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.calendar-cell {
  text-align: center;
  padding: 12px 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-weight: 500;
  transition: background 0.2s ease;
}

.calendar-cell.active {
  background: rgba(99, 102, 241, 0.2);
  cursor: pointer;
}

.calendar-cell.active:hover {
  background: #6366f1;
}

.calendar-cell.disabled {
  opacity: 0.3;
}

.calendar-cell.empty {
  background: transparent;
  pointer-events: none;
}





.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  margin-bottom: 16px;
  padding: 0 4px;
  color: white;
}

.calendar-header h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
  text-align: center;
  flex: 1;
}

.calendar-nav {
  background: none;
  border: none;
  color: white;
  font-size: 20px;
  cursor: pointer;
  padding: 4px 10px;
  transition: transform 0.2s ease, color 0.2s ease;
}

.calendar-nav:hover {
  color: #a5b4fc;
  transform: scale(1.2);
}


/* Контейнер календаря */
#booking-calendar-container {
  min-height: 240px; /* сохраняет высоту при загрузке */
  transition: opacity 0.2s ease;
}

/* Обертка вокруг стрелок, спиннера и календаря */
.calendar-wrapper {
  position: relative;
  min-height: 240px;
}

#calendar-loading {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10;
}

#calendar-loading.hidden {
  display: none;
}

.spinner {
  width: 48px;
  height: 48px;
  animation: spin 1s linear infinite;
}

.path {
  stroke: #ffffff;
  stroke-linecap: round;
  animation: dash 1.5s ease-in-out infinite;
}

@keyframes spin {
  100% {
    transform: rotate(360deg);
  }
}

@keyframes dash {
  0% {
    stroke-dasharray: 1, 150;
    stroke-dashoffset: 0;
  }
  50% {
    stroke-dasharray: 90, 150;
    stroke-dashoffset: -35;
  }
  100% {
    stroke-dasharray: 90, 150;
    stroke-dashoffset: -124;
  }
}


.time-list {
  max-height: 70vh;
  overflow-y: auto;

  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
  justify-content: center;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.time-btn {
  padding: 10px 16px;
  border-radius: 8px;
  background: #4f46e5;
  color: white;
  border: none;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.2s ease;
}

.time-btn:hover {
  background: #6366f1;
}




.modal-buttons {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 16px;
}

.modal-buttons .cancel {
  background-color: #9ca3af; /* серый */
}

.modal-buttons .cancel:hover {
  background-color: #6b7280;
}










#custom-message {
  
  overflow-y: auto;

 
  max-width: 100vw;

  padding: 10px;
  margin-top: 20px;      
  margin-left: auto;
  margin-right: auto;    

  
  
}
 

#custom-message .booking-card {
  overflow: hidden;
  display: flex;
  gap: 12px;
  background: rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 12px;
  align-items: center;
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.2);
  max-width: 100%;
  box-sizing: border-box;
}

#custom-message .booking-card img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 10px;
  flex-shrink: 0;
}

#custom-message .booking-info {
  flex: 1;
  overflow: hidden;
}

#custom-message .booking-scroll-container {
  max-height: 260px;
  overflow-y: auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  padding-right: 4px;
  padding-bottom: 8px;
}

#custom-message .booking-heading {
  font-weight: 600;
  color: #fef08a;
  margin-bottom: 8px;
  padding: 6px 10px;
  position: sticky;
  top: 0;
  z-index: 2;
  backdrop-filter: blur(6px);
}


.booking-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  padding-right: 4px;
}


  @media (max-width: 768px) {
    .header {
      flex-direction: column;
      align-items: flex-start;
      gap: 12px;
    }
  
    .title {
      font-size: 22px;
    }
  
    .primary-btn {
      width: 100%;
      text-align: center;
      padding: 10px;
    }
  
    .panel {
      padding: 20px;
    }
  
    .service {
      flex-direction: column;
      align-items: flex-start;
      gap: 8px;
    }
  
    .service-name {
      font-size: 16px;
    }
  
    .service-price {
      font-size: 15px;
    }
  }
  
  