/**
 * Salon Sequential Slots - Frontend Styles
 * Стили для последовательного отображения слотов
 */

/* Скрытые слоты - визуально скрываем но не блокируем DOM */
.minute.sln-sequential-hidden {
    display: none !important;
}

/* Следующий доступный слот */
.minute.sln-next-available-slot {
    position: relative;
    background: linear-gradient(135deg, #A68E68 0%, #8B7355 100%) !important;
    color: #fff !important;
    font-weight: bold;
    border: 2px solid #A68E68;
    box-shadow: 0 4px 15px rgba(166, 142, 104, 0.4);
    transform: scale(1.05);
    z-index: 10;
    animation: pulse-slot 2s infinite;
}

.minute.sln-next-available-slot:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(166, 142, 104, 0.6);
}

/* Анимация пульсации */
@keyframes pulse-slot {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(166, 142, 104, 0.4);
    }
    50% {
        box-shadow: 0 6px 25px rgba(166, 142, 104, 0.7);
    }
}

/* Индикатор "следующий слот" */
.sln-next-indicator {
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    background: #667eea;
    color: #fff;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 10px;
    white-space: nowrap;
    font-weight: normal;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.sln-next-indicator:after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid #667eea;
}

/* Выбранный слот */
.minute.sln-slot-selected {
    border-color: #28a745 !important;
    background: #28a745 !important;
}

/* Уведомления */
.sln-sequential-notification {
    position: relative;
    padding: 12px 20px;
    margin-bottom: 15px;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.4;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sln-notification-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.sln-notification-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.sln-notification-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.sln-notification-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Полностью забронированная дата */
.datetimepicker-days .day.full {
    background: repeating-linear-gradient(
        45deg,
        #f8f9fa,
        #f8f9fa 10px,
        #e9ecef 10px,
        #e9ecef 20px
    );
    position: relative;
}

.datetimepicker-days .day.full:after {
    content: '✕';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    color: #dc3545;
    font-weight: bold;
}

/* Календарь - улучшения для последовательных слотов */
.datetimepicker-minutes {
    position: relative;
}

.datetimepicker-minutes-wrapper-table {
    max-height: 400px;
    overflow-y: auto;
    scroll-behavior: smooth;
}

/* Скроллбар для минут */
.datetimepicker-minutes-wrapper-table::-webkit-scrollbar {
    width: 8px;
}

.datetimepicker-minutes-wrapper-table::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.datetimepicker-minutes-wrapper-table::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.datetimepicker-minutes-wrapper-table::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Отключенные слоты */
.minute.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Мобильные стили */
@media (max-width: 768px) {
    .sln-next-indicator {
        font-size: 9px;
        padding: 2px 6px;
        top: -22px;
    }

    .minute.sln-next-available-slot {
        transform: scale(1.02);
    }

    .minute.sln-next-available-slot:hover {
        transform: scale(1.04);
    }

    .sln-sequential-notification {
        padding: 10px 15px;
        font-size: 13px;
    }
}

/* Дополнительные визуальные эффекты */
.minute {
    transition: all 0.3s ease;
}

.minute:not(.disabled):hover {
    transform: translateY(-2px);
}

/* Loader для загрузки слотов */
.sln-sequential-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 100;
}

.sln-sequential-loading:after {
    content: '';
    display: block;
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Улучшенная доступность */
.minute.sln-next-available-slot:focus {
    outline: 3px solid #667eea;
    outline-offset: 2px;
}

/* Темная тема (опционально) */
@media (prefers-color-scheme: dark) {
    .sln-notification-info {
        background: #1e3a4c;
        color: #9fd3e8;
        border-color: #2c5468;
    }

    .sln-notification-warning {
        background: #4a3c1e;
        color: #f0d999;
        border-color: #5e4d28;
    }

    .datetimepicker-days .day.full {
        background: repeating-linear-gradient(
            45deg,
            #2c2c2c,
            #2c2c2c 10px,
            #1e1e1e 10px,
            #1e1e1e 20px
        );
    }
}

/* Информационная панель */
.sln-sequential-info {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 20px;
}

.sln-sequential-info h4 {
    margin-top: 0;
    color: #667eea;
    font-size: 16px;
}

.sln-sequential-info ul {
    margin: 10px 0 0 0;
    padding-left: 20px;
}

.sln-sequential-info li {
    margin-bottom: 5px;
    font-size: 14px;
    color: #6c757d;
}

