/* Кастомные стили для SweetAlert2 - компактный и красивый дизайн */

/* Высокий z-index для отображения поверх модальных окон */
.swal2-container {
    z-index: 9999999999 !important;
    overflow: visible !important;
}

.swal2-popup {
    z-index: 9999999999 !important;
    overflow: visible !important;
}

.swal2-backdrop-show {
    z-index: 9999999998 !important;
}

/* Простые кастомные классы */
.swal2-container-simple {
    z-index: 9999999999 !important;
}

.swal2-popup-simple {
    z-index: 9999999999 !important;
}

/* Поведение select внутри SweetAlert2 */
.swal2-popup select,
.swal2-popup .form-select {
    position: relative !important;
    z-index: 10000000001 !important;
}

/* Основной контейнер */
.swal2-popup {
    padding: 1.5rem !important;
    width: auto !important;
    min-width: 280px !important;
    max-width: 380px !important;
    font-size: 0.9rem !important;
    border-radius: 16px !important;
    background: #ffffff !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12) !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
}

/* Заголовок */
.swal2-title {
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    color: #1a202c !important;
    margin-bottom: 0.75rem !important;
    padding: 0 !important;
    line-height: 1.3 !important;
}

/* Текст сообщения */
.swal2-html-container {
    font-size: 0.85rem !important;
    color: #4a5568 !important;
    margin: 0.75rem 0 !important;
    padding: 0 !important;
    line-height: 1.4 !important;
}

/* Иконка */
.swal2-icon {
    transform: scale(0.8) !important;
    margin: 0.75rem auto !important;
}

/* Контейнер кнопок */
.swal2-actions {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 10px !important;
    margin-top: 1.5rem !important;
    flex-wrap: wrap !important;
}

/* Общие стили для всех кнопок */
.swal2-styled {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 100px !important;
    height: 38px !important;
    padding: 8px 16px !important;
    font-size: 0.85rem !important;
    font-weight: 500 !important;
    border-radius: 10px !important;
    border: none !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    text-decoration: none !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
    outline: none !important;
    font-family: inherit !important;
}

/* Кнопка подтверждения */
.swal2-confirm {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%) !important;
    color: white !important;
}

.swal2-confirm:hover {
    background: linear-gradient(135deg, #c82333 0%, #bd2130 100%) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.25) !important;
}

.swal2-confirm:active {
    transform: translateY(0) !important;
    box-shadow: 0 2px 6px rgba(220, 53, 69, 0.2) !important;
}

/* Кнопка отмены */
.swal2-cancel {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%) !important;
    color: white !important;
}

.swal2-cancel:hover {
    background: linear-gradient(135deg, #5a6268 0%, #495057 100%) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.25) !important;
}

.swal2-cancel:active {
    transform: translateY(0) !important;
    box-shadow: 0 2px 6px rgba(108, 117, 125, 0.2) !important;
}

/* Анимации появления и исчезновения */
.swal2-show {
    animation: swal2-show 0.25s ease-out !important;
}

.swal2-hide {
    animation: swal2-hide 0.25s ease-in !important;
}

@keyframes swal2-show {
    0% {
        opacity: 0;
        transform: scale(0.9) translateY(-10px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes swal2-hide {
    0% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
    100% {
        opacity: 0;
        transform: scale(0.9) translateY(-10px);
    }
}

/* Стили для разных типов алертов */
.swal2-success {
    border: none !important;
}

.swal2-error {
    border: none !important;
}

.swal2-warning {
    border: none !important;
}

.swal2-info {
    border: none !important;
}

/* Скрываем неиспользуемые кнопки */
.swal2-deny {
    display: none !important;
}

/* Wide SweetAlert: reduce height by ~15% and enable body scroll */
.swal2-popup.swal-wide-popup {
  max-height: 85vh !important; /* reduce overall height */
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important; /* keep footer visible */
}
.swal2-popup.swal-wide-popup .swal2-html-container {
  flex: 1 1 auto !important;
  overflow-y: auto !important; /* scroll content when overflowing */
  margin-bottom: 1rem !important;
}
.swal2-popup.swal-wide-popup .swal2-actions {
  margin-top: 0 !important;
}

/* Стили для мобильных устройств */
@media (max-width: 480px) {
    .swal2-popup {
        padding: 1.25rem !important;
        min-width: 260px !important;
        margin: 0.75rem !important;
    }
    
    .swal2-title {
        font-size: 1rem !important;
    }
    
    .swal2-html-container {
        font-size: 0.8rem !important;
    }
    
    .swal2-actions {
        flex-direction: row !important;
        gap: 8px !important;
        width: 100% !important;
        justify-content: center !important;
    }
    
    .swal2-styled {
        width: auto !important;
        min-width: 80px !important;
        height: 36px !important;
        font-size: 0.8rem !important;
        padding: 6px 12px !important;
    }

    .swal2-popup.swal-wide-popup {
      max-height: 85vh !important; /* consistent on mobile */
    }
}

/* Стили для планшетов */
@media (min-width: 481px) and (max-width: 768px) {
    .swal2-popup {
        padding: 1.5rem !important;
        min-width: 300px !important;
    }
    
    .swal2-actions {
        gap: 12px !important;
    }
    
    .swal2-styled {
        min-width: 110px !important;
        height: 40px !important;
    }
} 