/* Modal Overlay */
.booking-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
}

/* Close button */
.booking-close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.booking-close-btn:hover {
    color: #333;
}

/* Base styles */
.booking-modal-overlay * {
    box-sizing: border-box;
}

/* Container */
.booking-container {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    color: #333;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    max-height: 95vh;
    overflow-y: auto;
    position: relative;
    
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

/* Header */
.booking-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.booking-header h1 {
    margin: 0;
    font-size: 24px;
    color: #333;
}

.booking-header .booking-subtitle {
    font-size: 18px;
    color: #666;
}

.booking-lang-selector {
    font-size: 14px;
    margin-left: auto;
}

.booking-lang-selector a {
    color: #666;
    text-decoration: none;
    margin: 0 5px;
}

.booking-lang-selector a.active {
    color: #007bff;
    font-weight: bold;
}

/* Calendar */
.booking-calendar-container {
    padding: 20px;
}

.booking-calendar-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.booking-calendar-header span {
    font-size: 18px;
    font-weight: 600;
}

.booking-calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-weight: 600;
    margin-bottom: 10px;
}

.booking-weekday {
    text-align: center;
    font-weight: 600;
}

.booking-calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.booking-calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #eee;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
}

.booking-calendar-day:hover:not(.disabled):not(.selected) {
    background: #f0f0f0;
}

.booking-calendar-day.selected {
    background: #007bff;
    color: white;
    font-weight: 600;
}

.booking-calendar-day.disabled {
    background: #e9ecef;
    color: #adb5bd;
    cursor: not-allowed;
}

.booking-calendar-day.other-month {
    color: #adb5bd;
}

.booking-calendar-day.today {
    border: 2px solid #007bff;
}

/* Slots container */
.booking-slots-container {
    padding: 20px;
}

.booking-slots-container h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 18px;
}

.booking-slots-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}

.booking-slot-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    border: 1px solid #eee;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    background: #fff;
}

.booking-slot-item:hover:not(.disabled):not(.selected) {
    background: #f8f9fa;
    border-color: #ddd;
}

.booking-slot-item.available {
    border-color: #28a745;
}

.booking-slot-item.available:hover {
    background: rgba(40, 167, 69, 0.1);
}

.booking-slot-item.booked {
    background: rgba(220, 53, 69, 0.1);
    border-color: #dc3545;
    cursor: not-allowed;
}

.booking-slot-item.closed {
    background: rgba(108, 117, 125, 0.1);
    border-color: #6c757d;
    cursor: not-allowed;
}

.booking-slot-item.selected {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.booking-slot-item.selected:hover {
    background: #0069d9;
}

.booking-slot-time {
    font-weight: 500;
}

.booking-slot-status {
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.booking-slot-status.available::before {
    content: "✓";
    color: #28a745;
}

.booking-slot-status.booked::before {
    content: "✕";
    color: #dc3545;
}

.booking-slot-status.closed::before {
    content: "⏸";
    color: #6c757d;
}

.booking-slot-status.selected::before {
    content: "🔵";
    color: #fff;
}

.booking-slot-action {
    padding: 5px 10px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    white-space: nowrap;
}

.booking-slot-action:hover {
    background: #0069d9;
}

.booking-slot-action:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.booking-no-data {
    color: #666;
    font-style: italic;
    text-align: center;
    padding: 20px;
    grid-column: 1 / -1;
}

/* Buttons */
.booking-btn {
    padding: 10px 20px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.booking-btn:hover:not(:disabled) {
    background: #f0f0f0;
}

.booking-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.booking-btn-primary {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.booking-btn-primary:hover:not(:disabled) {
    background: #0069d9;
}

.booking-btn-large {
    width: 100%;
    padding: 15px;
    font-size: 16px;
    margin-top: 20px;
}

/* Responsive */
@media (max-width: 992px) {
    .booking-container {
        grid-template-columns: 1fr;
    }
    
    .booking-calendar-container,
    .booking-slots-container {
        margin-bottom: 20px;
    }
}

@media (max-width: 768px) {
    .booking-slots-list {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .booking-calendar-weekdays,
    .booking-calendar-days {
        grid-template-columns: repeat(7, 1fr);
    }
    
    .booking-calendar-day {
        font-size: 12px;
        min-height: 35px;
    }
}

@media (max-width: 480px) {
    .booking-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .booking-header h1 {
        font-size: 20px;
    }
    
    .booking-subtitle {
        display: none;
    }
    
    .booking-lang-selector {
        margin-left: 0;
    }
    
    .booking-slots-list {
        grid-template-columns: 1fr;
    }
}

/* Скрыть бегунок прокрутки, но оставить функционал */
.booking-container::-webkit-scrollbar {
    display: none;
}
.booking-container {
    -ms-overflow-style: none;
    scrollbar-width: none;
}
