/* @import url('globals.css'); */


/* === Booking Page Styles === */

body {
    font-family: var(--font-main);
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-background);
}

/* Контейнер всей страницы */
.b-main {
    font-family: var(--font-main);
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-background);
    max-width: 1100px;
    margin: 40px auto;
    padding: 20px;
    box-sizing: border-box;
}

/* Хэдер booking.php */
.b-header {
    background-color: var(--color-background);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    font-family: var(--font-main);
    font-weight: 700
    font-size: var(--font-size-header);
    padding: 20px 10px;
    border-bottom: 1px solid #ddd;
    text-align: center;
}

.b-logo {
    height: 80px;
    max-width: 200px;
    object-fit: contain;
}

.b-logo-bar {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.b-title {
    font-size: 24px;
    margin-top: 10px;
}

.b-top-bar {
    padding: 10px;
    background: #f8f8f8;
    font-size: 14px;
}

.b-language-switch a {
    margin-right: 10px;
    font-weight: 700;
    text-decoration: none;
    color: #333;
}

.b-top-buttons {
    display: flex;
    flex-wrap: wrap; /* ➕ разрешаем перенос */
    justify-content: center;
    gap: 10px;
    border: none;
    border-radius: 6px;
    text-align: center;
    margin-bottom: 30px;
}

.b-nav-button {
    background-color: var(--color-primary);
    color: white;
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    white-space: nowrap;
    box-shadow: 0 2px 5px rgba(46, 119, 88, 0.3);
    transition: all 0.5s ease;
}

.b-nav-button:hover {
    background-color: var(--color-hover);
}
.modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.modal-window {
    background: white;
    padding: 20px 25px;
    border-radius: 12px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

.modal-window h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 18px;
}

.modal-window input {
    width: 100%;
    padding: 10px;
    margin-bottom: 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
}

.modal-window button {
    margin-right: 10px;
    padding: 10px 20px;
    border: none;
    background: #00695c;
    color: white;
    border-radius: 8px;
    cursor: pointer;
}

.modal-window button.modal-close {
    background: #ccc;
    color: #333;
}

.cancel-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cancel-modal.hidden {
    display: none;
}

.cancel-modal-content {
    background: white;
    padding: 24px;
    border-radius: 12px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 0 12px rgba(0, 0, 0, 0.2);
    text-align: center;
}

.cancel-details-text {
    margin: 16px 0;
    font-size: 15px;
}

.cancel-modal-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.cancel-modal-buttons button {
    min-width: 120px; /* выровняет по ширине */
    cursor: pointer;
}


.b-nav-button.danger {
    background: #dc3545;
    color: white;
}


.reservation-rules-block {
    background-color: var(--color-white);
    border: 1px solid #ddd;
    padding: 16px;
    margin: 20px auto;
    border-radius: 6px;
    max-width: 800px;
    font-size: 15px;
    line-height: 1.6;
    box-shadow: 0 2px 5px rgba(46, 119, 88, 0.3);
}

.reservation-rules-block ul {
    padding-left: 20px;
    margin-top: 10px;
}

.reservation-rules-block li {
    margin-bottom: 6px;
}

.pond-map-wrapper {
    display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-top: 20px;
  margin-bottom: 20px;
  transition: all 0.3s ease;
}

.pond-map-wrapper img {
  max-width: 100%;
  height: auto;
  max-height: 400px;
  border-radius: 8px;
  cursor: zoom-in;
  transition: opacity 0.3s ease;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.map-modal {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  transform: scale(0.9); /* << переносим сюда! */
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.map-modal.show {
  opacity: 1;
  pointer-events: all;
  transform: scale(1); /* << увеличиваем всю модалку */
}

.map-modal-content img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  cursor: zoom-out;
}



.sectors-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-bottom: 30px;
    margin-top: 10px;
}

.sector-btn {
    background-color: var(--color-primary);
    color: white;
    padding: 6px 12px;
    border: 3px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    transition: all 0.5s ease;
}

.sector-btn:hover {
        border: 3px solid var(--color-hover);
    }

.sector-btn .active {
        background-color: var(--color-hover);
    }

/* === Календарь === */
.calendar-container {
    overflow-x: auto;
    overflow-y: hidden; /* ❌ убираем вертикальную прокрутку */
    box-shadow: 0 2px 5px rgba(46, 119, 88, 0.3);
    border-radius: 8px;
    background-color: var(--color-white);
}

.calendar-table {
    width: 100%;
    border-collapse: collapse;
    text-align: center;
    font-size: 15px;
}

.calendar-table th, .calendar-table td {
    padding: 10px;
    border: 1px solid #ccc;
    min-width: 50px;
}

.calendar-table td {
    position: relative;
}

.half-am {
    background: linear-gradient(to bottom, #f8d7da 50%, #d4edda 50%);
}

.half-pm {
    background: linear-gradient(to top, #f8d7da 50%, #d4edda 50%);
}

.selected-date {
    box-shadow: inset 0 0 0 3px #114b5f;
    font-weight: 700;
    transition: all 0.2s ease-in-out;
}

/* 🖍️ Временное выделение даты до выбора слота */
.highlighted-date-temp {
    box-shadow: inset 0 0 0 3px #114b5f;
    background-color: rgba(17, 75, 95, 0.08);
    transition: all 0.15s ease-in-out;
}


.selected-full {
    box-shadow: inset 0 0 0 3px #114b5f;
    background-color: rgba(40, 167, 69, 0.4);
}

.selected-half-am {
    box-shadow: inset 0 0 0 3px #114b5f;
    background: linear-gradient(to bottom, rgba(40, 167, 69, 0.4) 50%, transparent 50%);
}

.selected-half-pm {
    box-shadow: inset 0 0 0 3px #114b5f;
    background: linear-gradient(to top, rgba(40, 167, 69, 0.4) 50%, transparent 50%);
}

.selected-custom {
    box-shadow: inset 0 0 0 3px #114b5f;
    /*background: repeating-linear-gradient(135deg, #f8d7da, #f8d7da 5px, #d4edda 5px, #d4edda 10px); */
}

/* 🏠 Меню выбора слотов */
.slot-selector {
    position: absolute;
    top: 110%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 6px;
    box-shadow: 0 2px 5px rgba(46, 119, 88, 0.3);
    z-index: 999;
    min-width: 140px;
}

/* 📌 Центрированное фиксированное меню */
.slot-selector.floating {
    position: absolute !important; /* 🔧 исправлено с fixed на absolute */
    z-index: 10000;
    width: 240px;
}

.slot-selector button,
.slot-selector select,
.slot-selector .time-select {
    display: block;
    width: 100%;
    padding: 6px 10px;
    margin: 4px 0;
    background-color: var(--color-primary);
    color: white;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.5s ease;
    box-shadow: 0 2px 5px rgba(46, 119, 88, 0.3);
}

.slot-selector button:hover {
    background-color: var(--color-hover);
}

/* 🌠 Анимации меню */
.fade-in {
    opacity: 0;
    animation: fadeIn 0.2s ease-out forwards;
}

.fade-out {
    animation: fadeOut 0.15s ease-in forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes fadeOut {
    to {
        opacity: 0;
    }
}

/* ✅ Свободная дата */
.available {
    background-color: #d4edda;
}

/* ⛔️ Занятая дата */
.booked {
    background-color: #f8d7da;
}

/* 🧩 Кастомная занятость из базы (для отображения) */
.custom-booked {
    background: repeating-linear-gradient(
        45deg,
        #f8d7da,
        #f8d7da 5px,
        #d4edda 5px,
        #d4edda 10px
    );
    position: relative;
}

.busy-times-info {
    background-color: #ffecec;
    color: #b30000;
    font-size: 13px;
    margin-bottom: 6px;
    padding: 4px 8px;
    border-left: 4px solid #ff4d4d;
    border-radius: 4px;
}


.cell-tooltip {
    position: absolute;
    background: #114b5f;
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 13px;
    z-index: 10000;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transform: translateY(-5px);
    transition: opacity 0.15s ease-in-out, transform 0.15s ease-in-out;
}

.cell-tooltip.show {
    opacity: 1;
    transform: translateY(0);
}


/* === Форма бронирования === */
.booking-form-container {
    background-color: var(--color-white);
    padding: 20px;
    margin-top: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(46, 119, 88, 0.3);
}

.booking-form-container h3 {
    margin-bottom: 15px;
    color: var(--color-text);
}

#booking-form input {
    width: 98%;
    padding: 10px;
    margin-bottom: 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
}

#booking-form button {
    background-color: var(--color-primary);
    color: #fff;
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    box-shadow: 0 2px 5px rgba(46, 119, 88, 0.3);
}

#booking-form button .active {
    background-color: var(--color-hover);
}

#booking-message {
    margin-top: 10px;
    font-weight: 700;
    color: green;
}

/* Чекбокс блока GDPR */
#booking-form .gdpr-checkbox-wrapper {
  margin-top: 20px;
  margin-bottom: 20px
}

#booking-form .gdpr-checkbox-label {
  display: flex;
  align-items: flex-start; /* Лучше, если текст может быть многострочным */
  gap: 10px;
  font-size: 14px;
  line-height: 1.4;
  color: var(--color-text); /* Поддержка темы */
}

#booking-form .gdpr-checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 3px; /* Чтобы выровнять с текстом */
  accent-color: var(--color-primary);
  cursor: pointer;
}


/* 🔘 Активный выбранный сектор */
.selected-sector {
    background-color: var(--color-hover) !important;
    font-weight: 700;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
}

/* 📘 Легенда */
.calendar-legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
    font-size: 14px;
    margin-bottom: 20px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 4px;
    font-weight: 500;
    background-color: #e9ecef;
}

.legend-item.available {
    background-color: #d4edda;
}

.legend-item.half-am {
    background: linear-gradient(to bottom, #f8d7da 50%, #d4edda 50%);
}

.legend-item.half-pm {
    background: linear-gradient(to top, #f8d7da 50%, #d4edda 50%);
}

.legend-item.booked {
    background-color: #f8d7da;
}

.legend-item.custom-booked {
    background: repeating-linear-gradient(
        45deg,
        #f8d7da,
        #f8d7da 5px,
        #d4edda 5px,
        #d4edda 10px
    );
}

footer {
  display: flex;
  flex-wrap: wrap;
  background-color: var(--color-primary);
  color: var(--color-white);
  padding: 20px;
  gap: 30px;
  justify-content: space-between;
  align-items: flex-start;
  text-align: left;
}

.footer-left {
  flex: 1 1 30%;
}

.footer-left ul {
  list-style: none;
  padding: 0;
}

.footer-left li {
  margin-bottom: 10px;
}

.footer-left a {
  color: var(--color-white);
  text-decoration: none;
  font-weight: 700;
}

.footer-left a:hover {
  text-decoration: underline;
}

.footer-right {
  flex: 1 1 60%;
  text-align: right;
}

/* Мобильная адаптация */
@media (max-width: 768px) {
  footer {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .footer-right {
    text-align: center;
    margin-top: 20px;
  }
}



/* 📱 Адаптивность */
@media (max-width: 600px) {
    .b-title {
        font-size: 16px;
    }

    .sector-btn {
        font-size: 12px;
        padding: 8px 12px;
    }

    .calendar-table th, .calendar-table td {
        padding: 6px;
    }

    .b-logo {
        height: 60px;
    }

    .b-nav-button {
        margin: 5px 6px;
        font-size: 13px;
    }
    
    .b-top-buttons {
        flex-direction: column;     /* 📱 в колонку */
        align-items: center;        /* 📍 по центру */
    }

    .b-nav-button {
        width: 90%;                 /* ⬅️ почти во всю ширину */
        text-align: center;
    }
}
/* ========================= */
