/* Основные стили для попапа */
.ticket-popup {
  font-family: 'Arial', sans-serif;
  max-width: 400px;
  margin: 0 auto;
  padding: 20px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* Заголовок */
.ticket-popup h2 {
  color: #333;
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
  text-align: center;
}

/* Подзаголовок */
.ticket-popup .subtitle {
  color: #666;
  font-size: 14px;
  text-align: center;
  margin-bottom: 20px;
  line-height: 1.4;
}

/* Блок с информацией о билете */
.ticket-info {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 20px;
  border: 1px solid #e9ecef;
}

.ticket-type {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.ticket-name {
  font-weight: 600;
  color: #333;
  font-size: 18px;
}

.ticket-price {
  font-weight: 700;
  color: #2c5aa0;
  font-size: 20px;
}

.ticket-details {
  display: flex;
  gap: 15px;
  color: #666;
  font-size: 14px;
}

/* Поля формы */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  /* font-weight: 600; */
  color: #333;
  font-size: 16px;
}

.form-group input {
  width: 100%;
  padding: 12px;
  border: 2px solid #e9ecef;
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.3s ease;
  box-sizing: border-box;
}

.form-group input:focus {
  outline: none;
  border-color: #2c5aa0;
}

/* Предупреждение о проверке email */
.email-warning {
  background: #fff3cd;
  border: 1px solid #ffeaa7;
  border-radius: 6px;
  padding: 10px;
  margin-bottom: 20px;
  font-size: 12px;
  color: #856404;
  text-align: center;
}

/* Чекбокс */
.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 25px;
}

.checkbox-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: #2c5aa0;
}

.checkbox-group label {
  font-size: 13px;
  color: #666;
  line-height: 1.4;
  cursor: pointer;
}

.checkbox-group a {
  color: #2c5aa0;
  text-decoration: none;
}

.checkbox-group a:hover {
  text-decoration: underline;
}

/* Кнопка покупки */
.buy-button {
  width: 100%;
  background-image: radial-gradient(circle at center, rgba(31, 165, 255, 1) 0%, rgba(16, 83, 255, 1) 100%);
  color: white;
  border: none;
  padding: 15px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.buy-button:hover {
  background: linear-gradient(135deg, #34669a, #34669a);
  transform: translateY(-2px);
}

.buy-button:active {
  transform: translateY(0);
}

/* Адаптивность */
@media (max-width: 480px) {
  .ticket-popup {
    margin: 10px;
    padding: 15px;
  }
  
  .ticket-details {
    flex-direction: column;
    gap: 5px;
  }
}

/* Стили для состояния загрузки */
.buy-button.loading {
  opacity: 0.7;
  cursor: not-allowed;
}

/* Стили для ошибок валидации */
.form-group.error input {
  border-color: #dc3545;
}

.error-message {
  color: #dc3545;
  font-size: 12px;
  margin-top: 5px;
}
.seat-selector {
    margin-bottom: 25px;
}

.seat-selector h3 {
    font-size: 16px;
    margin-bottom: 15px;
    color: #495057;
}



.seat {
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #e9ecef;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.seat:hover {
    background-color: #dee2e6;
}

.seat.selected {
    background-color: #6a11cb;
    color: green;
}

/* Стили для модального окна схемы */
        .scheme-modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.8);
            z-index: 2000;
            justify-content: center;
            align-items: center;
        }

        .scheme-modal-content {
            background: white;
            border-radius: 12px;
            max-width: 100%;
            max-height: 90%;
            position: relative;
            box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
            overflow: hidden;
        }

        .scheme-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 20px 30px;
            background: #f8f9fa;
            border-bottom: 1px solid #dee2e6;
        }

        .scheme-header h2 {
            color: #333;
            font-size: 24px;
            margin: 0;
        }

        .close-scheme {
            background: none;
            border: none;
            font-size: 28px;
            cursor: pointer;
            color: #6c757d;
            transition: all 0.3s;
            width: 40px;
            height: 40px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
        }

        .close-scheme:hover {
            background: #e9ecef;
            color: #333;
        }

        .scheme-image-container {
            padding: 30px;
            text-align: center;
            max-height: calc(90vh - 100px);
            overflow: auto;
        }

        .scheme-image {
            max-width: 100%;
            max-height: 70vh;
            border-radius: 8px;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
        }

        .scheme-legend {
            margin-top: 20px;
            padding: 20px;
            background: #f8f9fa;
            border-radius: 8px;
            display: inline-block;
        }

        @media (max-width: 868px) {
            .seat-grid {
                grid-template-columns: repeat(4, 1fr);
            }
            
            .scheme-header {
                padding: 15px 20px;
            }
            
            .scheme-header h2 {
                font-size: 20px;
            }
            
            .scheme-image-container {
                padding: 15px;
            }
            
            .legend-items {
                flex-direction: column;
                gap: 10px;
            }
        }
        /* Стили кнопки "Показать СХЕМУ" */
        .scheme-button-container {
            text-align: center;
            margin: 20px 0;
        }

        .show-scheme-btn {
            background-image: radial-gradient(circle at center, rgba(31, 165, 255, 1) 0%, rgba(16, 83, 255, 1) 100%);
            color: white;
            border: none;
            border-radius: 6px;
            padding: 12px 24px;
            font-size: 16px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s;
            display: inline-flex;
            align-items: center;
            gap: 8px;
        }

        .show-scheme-btn:hover {
            transform: translateY(-2px);
            background: linear-gradient(135deg, #34669a, #34669a);
        }
        
        /* Стили для мест */
        

.seat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 5px;
    margin: 15px 0;
}

.seat-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.seat {
    width: 50px;
    height: 50px;
    border: 2px solid #ddd;
    border-radius: 5px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
    position: relative;
    padding: 2px;
}

.seat-number {
    font-size: 14px;
    font-weight: bold;
    margin-top: 4px;
}

.seat-price {
    font-size: 9px;
    font-weight: 600;
    color: inherit;
    margin-bottom: 2px;
    line-height: 1;
}

.seat.available {
    background-color: #e8f5e8;
    border-color: #4CAF50;
    color: #2e7d32;
}

.seat.available:hover {
    
    transform: scale(1.1);
}

.seat.sold {
    background-color: #ffebee;
    border-color: #f44336;
    color: #c62828;
    cursor: not-allowed;
    opacity: 0.6;
}

.seat.selected {
    background-color: #4CAF50;
    border-color: #2e7d32;
    color: white;
    transform: scale(1.1);
}

/* Остальные стили остаются без изменений */
.seat-info {
    margin-bottom: 15px;
}

.seat-legend {
    display: flex;
    flex-wrap: wrap; /* Разрешаем перенос на новую строку */
    gap: 15px;
    justify-content: center;
    align-items: center;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
    flex: 0 0 auto; /* Не растягиваем элементы */
}

/* Для мобильных устройств */
@media (max-width: 768px) {
    .seat-legend {
        gap: 10px; /* Уменьшаем отступы */
        justify-content: space-around; /* Равномерное распределение */
    }
    
    .legend-item {
        flex-direction: column; /* Вертикальное расположение */
        gap: 3px;
        text-align: center;
        min-width: 70px; /* Минимальная ширина для аккуратного вида */
    }
    
    .legend-item span {
        font-size: 12px; /* Уменьшаем текст */
    }
}

/* Для очень маленьких экранов */
@media (max-width: 480px) {
    .seat-legend {
        flex-direction: column; /* Вертикальный стек */
        gap: 8px;
    }
    
    .legend-item {
        flex-direction: row; /* Горизонтально в вертикальном стеке */
        min-width: auto;
    }
    
    .legend-item span {
        font-size: 11px;
    }
}

.seat-available-preview, .seat-sold-preview, .seat-selected-preview, .seat-locked-preview {
    width: 20px;
    height: 20px;
    border-radius: 3px;
}

.seat-available-preview {
    background-color: #e8f5e8;
    border: 2px solid #4CAF50;
}

.seat-sold-preview {
    background-color: #ffebee;
    border: 2px solid #f44336;
}

.seat-selected-preview {
    background-color: #4CAF50;
    border: 2px solid #2e7d32;
}

.seat-locked-preview{
    background-color: #dee2e6;
    border: 2px solid #ddd;
}


