/* modal-calendar.css - стили для модального окна и календаря */

/* Стили для модального окна подтверждения */
#confirmationModal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 10px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    margin: 20px;
    box-sizing: border-box;
}

.modal-title {
    color: var(--primary-color, #6a11cb);
    margin-bottom: 20px;
    text-align: center;
    font-size: 1.8rem;
}

.modal-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 20px;
    justify-content: center;
    width: 100%;
}

.modal-button {
    padding: 12px 20px !important;
    border: none !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    font-weight: 600 !important;
    transition: all 0.3s !important;
    flex: 1;
    min-width: 120px;
    max-width: 200px;
    box-sizing: border-box !important;
    font-family: inherit !important;
    font-size: 1rem !important;
    text-align: center !important;
}

.modal-button.copy {
    background: var(--primary-color, #6a11cb) !important;
    color: white !important;
}

.modal-button.copy:hover {
    background: #5a0db9 !important;
}

.modal-button.save {
    background: #28a745 !important;
    color: white !important;
}

.modal-button.save:hover {
    background: #218838 !important;
}

.modal-button.close {
    background: #6c757d !important;
    color: white !important;
}

.modal-button.close:hover {
    background: #5a6268 !important;
}

.modal-footer {
    margin-top: 15px;
    font-size: 12px;
    color: #666;
    text-align: center;
}

#confirmationContent {
    margin-bottom: 20px;
    line-height: 1.6;
    white-space: pre-line;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 5px;
    border: 1px solid #e9ecef;
    width: 100%;
    box-sizing: border-box;
    word-break: break-word;
}

/* Стили для кнопки сохранения в основном интерфейсе */
.save-confirmation-btn {
    display: none;
    margin-top: 15px;
    padding: 12px 20px !important;
    background: #34495e !important;
    color: white !important;
    border: none !important;
    border-radius: 12px !important;
    cursor: pointer !important;
    font-weight: 600 !important;
    width: 100% !important;
    transition: background 0.3s !important;
    box-sizing: border-box !important;
    font-family: inherit !important;
    font-size: 1rem !important;
}

.save-confirmation-btn:hover {
    background: #2c3e50 !important;
}

.save-confirmation-btn.show {
    display: block !important;
}

/* Стили для календаря выбора дат */
.calendar-container {
    margin-top: 10px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
}

.calendar-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    width: 100%;
    flex-wrap: wrap;
}

.calendar-month {
    font-weight: 600;
    color: var(--primary-color, #6a11cb);
    font-size: 1.2rem;
}

.calendar-nav-btn {
    background: var(--primary-color, #6a11cb) !important;
    color: white !important;
    border: none !important;
    border-radius: 4px !important;
    padding: 8px 12px !important;
    cursor: pointer !important;
    font-size: 14px !important;
    transition: all 0.3s !important;
    box-sizing: border-box !important;
    font-family: inherit !important;
}

.calendar-nav-btn:hover {
    background: #5a0db9 !important;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    margin-bottom: 10px;
    width: 100% !important;
}

.calendar-day-name {
    text-align: center;
    font-weight: 600;
    color: #666;
    font-size: 12px;
    padding: 8px 5px;
    border-radius: 4px;
    min-width: 0 !important;
    width: auto !important;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calendar-day {
    text-align: center;
    padding: 8px 5px;
    cursor: pointer;
    border-radius: 4px;
    border: 1px solid transparent;
    transition: all 0.2s;
    font-size: 14px;
    position: relative;
    min-width: 0 !important;
    width: auto !important;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calendar-day:hover:not(.disabled):not(.past):not(.booked) {
    background: #e9ecef;
    border-color: #dee2e6;
}

.calendar-day.disabled {
    color: #ccc;
    cursor: not-allowed;
    background: #f8f9fa;
}

.calendar-day.past {
    color: #999;
    cursor: not-allowed;
    background: #f5f5f5;
}

.calendar-day.selected {
    background: var(--primary-color, #6a11cb) !important;
    color: white !important;
    border-color: #5a0db9 !important;
    font-weight: bold !important;
}

.calendar-day.range-start {
    background: var(--primary-color, #6a11cb) !important;
    color: white !important;
}

.calendar-day.range-end {
    background: var(--primary-color, #6a11cb) !important;
    color: white !important;
}

.calendar-day.in-range {
    background: #b3d1ff !important;
    color: var(--primary-color, #6a11cb) !important;
    border-radius: 0 !important;
}

.calendar-day.booked {
    background: #ffcccc !important;
    color: #666 !important;
    cursor: not-allowed !important;
    position: relative;
    text-decoration: line-through;
}

.calendar-day.booked::after {
    content: '✗';
    position: absolute;
    top: 2px;
    right: 2px;
    font-size: 10px;
    color: #ff4444;
}

.calendar-info {
    margin-top: 15px;
    font-size: 13px;
    color: #666;
    text-align: center;
    width: 100% !important;
    box-sizing: border-box !important;
    word-break: break-word !important;
}

.calendar-info span {
    display: inline-flex;
    align-items: center;
    margin: 0 10px;
}

.calendar-legend {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 2px;
    margin-right: 5px;
}

.selected-dates-info {
    margin-top: 15px;
    padding: 10px 15px !important;
    background: #e7f3ff !important;
    border-radius: 5px;
    border: 1px solid #b3d1ff !important;
    width: 100% !important;
    box-sizing: border-box !important;
    word-break: break-word !important;
}

.selected-dates-list {
    margin: 5px 0;
    font-size: 14px;
}

.clear-selection {
    background: #dc3545 !important;
    color: white !important;
    border: none !important;
    border-radius: 4px !important;
    padding: 8px 12px !important;
    cursor: pointer !important;
    font-size: 13px !important;
    margin-top: 10px;
    transition: background 0.3s !important;
    box-sizing: border-box !important;
    font-family: inherit !important;
    width: 100% !important;
}

.clear-selection:hover {
    background: #c82333 !important;
}

.hidden-date-input {
    display: none;
}

/* Стили для кнопки сброса дат */
.btn-clear-date {
    background: none !important;
    border: none !important;
    color: #ff4444 !important;
    cursor: pointer !important;
    font-size: 16px !important;
    margin-left: 10px;
    padding: 4px 8px !important;
    border-radius: 3px !important;
    transition: background-color 0.2s !important;
    box-sizing: border-box !important;
    font-family: inherit !important;
}

.btn-clear-date:hover {
    background-color: rgba(255, 68, 68, 0.1) !important;
}

.selected-date-text {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

/* Интеграция с шапкой сайта */
.header-container {
    background: var(--white, #ffffff);
    box-shadow: var(--shadow, 0 2px 10px rgba(0,0,0,0.1));
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    width: 100%;
}

.header-container .container {
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    max-width: 1200px;
    box-sizing: border-box;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    width: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.logo-img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: #293133;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 30px;
    align-items: center;
}

.nav-list a {
    text-decoration: none;
    color: var(--text-color, #333);
    font-weight: 500;
    transition: var(--transition, all 0.3s ease);
    position: relative;
}

.nav-list a:hover {
    color: var(--primary-color, #6a11cb);
}

.nav-list a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(to right, var(--primary-color, #6a11cb), var(--secondary-color, #2575fc));
    transition: var(--transition, all 0.3s ease);
}

.nav-list a:hover::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--primary-color, #6a11cb);
    background: none;
    border: none;
}

/* Адаптивность */
@media (max-width: 768px) {
    .modal-content {
        padding: 20px;
        width: 95%;
    }
    
    .modal-button {
        min-width: 100px;
        padding: 10px 15px !important;
    }
    
    .calendar-day-name,
    .calendar-day {
        padding: 6px 3px !important;
        font-size: 13px !important;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .nav-list {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        flex-direction: column;
        background-color: var(--white, #ffffff);
        padding: 30px;
        box-shadow: var(--shadow, 0 2px 10px rgba(0,0,0,0.1));
        transition: var(--transition, all 0.3s ease);
        gap: 20px;
        z-index: 999;
        box-sizing: border-box;
    }
    
    .nav-list.active {
        left: 0;
    }
}

@media (max-width: 480px) {
    .calendar-days {
        gap: 3px;
    }
    
    .calendar-day-name,
    .calendar-day {
        padding: 4px 2px !important;
        font-size: 12px !important;
    }
    
    .modal-buttons {
        flex-direction: column;
    }
    
    .modal-button {
        min-width: 100% !important;
        max-width: 100% !important;
    }
}