/* ==== БАЗОВАЯ РАЗМЕТКА ==== */
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

h1 {
  margin: 20px;
  text-align: center;
}

#calendar-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 0 10px 10px 10px;
  box-sizing: border-box;
  min-width: 0;
}

#calendar {
  flex: 1;
  width: 100%;
  min-width: 0;
}

/* ==== КАЛЕНДАРЬ ==== */
#calendar {
  max-width: 700px;
  margin: auto;
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.85rem;
  margin-bottom: 2rem !important;
  min-height: 300px;
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  padding: 15px;
}

/* Заголовок календаря */
#calendar .fc-toolbar-title {
  font-weight: 600;
  font-size: 1.25rem;
  color: #333;
}

/* Номера дней */
#calendar .fc .fc-daygrid-day-number {
  font-weight: 500;
  color: #555;
}

/* Сегодняшний день */
#calendar .fc-daygrid-day.fc-day-today {
  background-color:#e0f7fa;
  border-radius: 6px;
  transition: background-color 0.3s;
}

/* Hover по дням */
#calendar .fc-daygrid-day:not(.fc-disabled):hover {
  background-color: #f8f9fa;
  cursor: pointer;
  border-radius: 6px;
}

/* Деактивированные дни */
.fc-disabled {
  cursor: not-allowed !important;
  opacity: 0.7;
}

/* ==== АДАПТИВНОСТЬ ==== */
@media (max-width: 768px) {
  #calendar {
    max-width: 100%;
    font-size: 0.7rem;
    height: auto !important;
    min-height: 400px;
    margin-bottom: 1.5rem !important;
    padding: 10px;
  }

  #calendar .fc-toolbar {
    flex-direction: column;
    gap: 10px;
    padding: 5px;
    margin-bottom: 10px;
  }

  #calendar .fc-toolbar-title {
    font-size: 1.1rem;
    text-align: center;
    order: 1;
    margin: 5px 0;
  }

  #calendar .fc-toolbar-chunk {
    display: flex;
    justify-content: center;
    width: 100%;
  }

  #calendar .fc-toolbar-chunk:first-child { order: 2; }
  #calendar .fc-toolbar-chunk:last-child { order: 3; }

  #calendar .fc-button {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    margin: 0 2px;
  }

  #calendar .fc-daygrid-day {
    min-height: 35px;
  }

  #calendar .fc-daygrid-day-number {
    padding: 3px;
    font-size: 0.7rem;
  }

  #calendar .fc-col-header-cell {
    font-size: 0.75rem;
    padding: 8px 2px;
  }

  #calendar .fc-daygrid-event {
    font-size: 0.6rem;
  }
}

@media (max-width: 480px) {
  #calendar {
    min-height: 350px;
    margin-bottom: 1rem !important;
    padding: 5px;
  }

  #calendar .fc-col-header-cell {
    font-size: 0.65rem;
    padding: 5px 1px;
  }

  #calendar .fc-daygrid-day-number {
    font-size: 0.65rem;
  }

  #calendar .fc-button {
    padding: 0.3rem 0.6rem;
    font-size: 0.7rem;
  }
}

/* ==== ФИЛЬТР НАД КАЛЕНДАРЁМ ==== */
#calendar-filter {
  display: flex;
  justify-content: center;
  width: 100%;
  margin: 20px auto 25px auto;
}

#calendar-filter .row {
  width: 100%;
  max-width: 400px;   /* ограничиваем ширину */
  display: flex;
  justify-content: center;
}

#calendar-filter .col-md-6 {
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#calendar-filter label {
  text-align: center;
  font-weight: 500;
  margin-bottom: 6px;
}

#calendar-filter select {
  width: 100%;
  text-align: center;
  text-align-last: center;
}



/* ==== КАРТОЧКА ЗАКАЗА ==== */
.order-card {
  width: 50%;
  max-width: 600;
  margin: 20px auto;
  padding: 15px;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  box-sizing: border-box;
}

.order-card h2 {
  text-align: center;
  margin-bottom: 15px;
}

.order-card .form-group {
  margin-bottom: 10px;
}

.order-card label {
  font-weight: 500;
}

.order-card input {
  width: 100%;
  padding: 6px 10px;
  margin-top: 4px;
  border-radius: 4px;
  border: 1px solid #ccc;
  box-sizing: border-box;
}

.order-card .submit-btn {
  display: block;
  width: 100%;
  padding: 8px;
  font-weight: 600;
}

/* ==== МОДАЛЬНОЕ ОКНО ==== */
#modal-times button.time-btn {
  min-width: 80px;
  margin: 5px;
}

/* Адаптивность для модалки */
@media (max-width: 576px) {
  #calendar-filter {
    width: 95%;
  }

  .order-card {
    width: 95%; /* Добавьте эту строку */
    max-width: 95%; /* И эту */
    margin: 10px auto;
    padding: 10px;
  }

  #modal-times button.time-btn {
    min-width: 60px;
    padding: 5px 8px;
    font-size: 0.85rem;
  }
}
/* Стили для информации о бронировании */
.reservation-info {
  background-color: #f8f9fa;
  padding: 15px;
  border-radius: 5px;
  border-left: 4px solid #007bff;
}

.info-item {
  margin-bottom: 8px;
  font-size: 1rem;
}

.info-item:last-child {
  margin-bottom: 0;
}

.info-item strong {
  color: #495057;
  min-width: 100px;
  display: inline-block;
}

.table-type-header {
    background-color: #f8f9fa;
    padding: 10px;
    border-radius: 5px;
    border-left: 4px solid #007bff;
    margin-bottom: 10px;
}

.table-type-header strong {
    color: #495057;
    font-size: 1.1rem;
}

/* Добавьте в CSS */
.btn {
    position: relative;
}

.btn:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
    margin-bottom: 5px;
}

.btn:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #333;
    margin-bottom: -5px;
    z-index: 1000;
}




/* ТОНКАЯ КРАСНАЯ ДИАГОНАЛЬНАЯ ПОЛОСА ДЛЯ НЕРАБОЧИХ ДНЕЙ */
.fc-daygrid-day.non-working-day {
    position: relative;
    overflow: hidden;
}

.fc-daygrid-day.non-working-day::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        45deg,
        rgb(186 0 0 / 5%),
        rgb(206 0 0 / 5%) 4px,
        rgb(232 0 0 / 10%) 4px,
        rgb(255 0 0 / 10%) 8px
    );
    z-index: 1;
    pointer-events: none;
}

/* Для номеров дней в перечеркнутых ячейках */
.fc-daygrid-day.non-working-day .fc-daygrid-day-number {
    color: #666 !important;
    opacity: 0.7;
    position: relative;
    z-index: 2;
}

/* Скрываем события нерабочих дней */
.non-working-day-event {
    display: none !important;
}


/* Исправление чекбокса */
#order-card .form-check-input {
    width: 18px !important;
    height: 18px !important;
    margin-top: 0 !important;
    margin-right: 8px !important;
    float: none !important;
    flex-shrink: 0 !important;
}

#order-card .form-check {
    display: flex !important;
    align-items: center !important;
    margin-bottom: 1rem !important;
}

#order-card .form-check-label {
    margin-bottom: 0 !important;
    font-size: 0.9rem !important;
}

/* Stripe */
.card-section {
  border: 1px solid #e0e0e0;
  padding: 15px;
  border-radius: 8px;
  background: #f9f9f9;
  margin-bottom: 20px;
}

.card-info-text {
  color: #666;
  font-size: 0.85rem;
  margin-bottom: 10px;
}

.card-element {
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: white;
  margin-bottom: 10px;
}

.card-errors {
  color: #e74c3c;
  font-size: 0.85rem;
  margin-top: 5px;
  min-height: 20px;
}

.card-success {
  color: #27ae60;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 5px;
}

.loading-indicator {
  text-align: center;
  padding: 10px;
  color: #666;
}

/* Стили для Stripe Card Element */
.card-element {
    border: 1px solid #ced4da;
    border-radius: 4px;
    padding: 12px;
    background-color: white;
    margin-bottom: 10px;
}

.StripeElement {
    padding: 10px;
}

.StripeElement--focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.StripeElement--invalid {
    border-color: #dc3545;
}

.StripeElement--webkit-autofill {
    background-color: #fefde5 !important;
}

.card-success {
    display: flex;
    align-items: center;
    color: #198754;
    padding: 8px 12px;
    background-color: rgba(25, 135, 84, 0.1);
    border-radius: 4px;
    margin-top: 10px;
}

.card-success i {
    margin-right: 8px;
    font-size: 1.2rem;
}

.date-warning {
    background: #ffe5e5;
    color: #b30000;
    padding: 10px 15px;
    border-radius: 6px;
    text-align: center;
    font-weight: 500;
    margin-bottom: 15px;
    border: 1px solid #ffb3b3;
}


.custom-alert {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #ff4d4d;
    color: white;
    padding: 12px 20px;
    border-radius: 6px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    z-index: 9999;
    display: none;
    max-width: 90%;
    text-align: center;
}

/* Адаптивность для мобильных */
@media (max-width: 480px) {
    .custom-alert {
        top: 10px;
        padding: 10px 14px;
        font-size: 0.9rem;
        border-radius: 5px;
        max-width: 95%;
    }
}


