/* ===== УНИВЕРСАЛЬНЫЕ СТИЛИ ДЛЯ МОДАЛЬНЫХ ОКОН ===== */

/* Основные стили модального окна */
.custom-modal .modal-content {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-heavy);
    background: var(--bg-primary);
}

.custom-modal .modal-header {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    border-bottom: none;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    padding: 1.5rem;
}

.custom-modal .modal-title {
    color: white;
    font-weight: 600;
    font-size: 1.25rem;
    margin: 0;
    display: flex;
    align-items: center;
}

.custom-modal .modal-title i {
    margin-right: 0.5rem;
}

.custom-modal .btn-close {
    filter: invert(1);
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.custom-modal .btn-close:hover {
    opacity: 1;
}

.custom-modal .modal-body {
    padding: 1.5rem;
    color: var(--text-primary);
    line-height: 1.6;
}

.custom-modal .modal-footer {
    border-top: 1px solid var(--border-color);
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
}

/* Стили для кнопок в модальном окне */
.custom-modal .btn {
    padding: 0.75rem 2rem;
    font-weight: 600;
    border-radius: var(--border-radius);
    transition: var(--transition);
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.custom-modal .btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
}

.custom-modal .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-medium);
}

.custom-modal .btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.custom-modal .btn-secondary:hover {
    background: var(--bg-tertiary);
    transform: translateY(-1px);
}

.custom-modal .btn-danger {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
}

.custom-modal .btn-danger:hover {
    background: linear-gradient(135deg, #c82333, #a71e2a);
    transform: translateY(-1px);
    box-shadow: var(--shadow-medium);
}

.custom-modal .btn-success {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
}

.custom-modal .btn-success:hover {
    background: linear-gradient(135deg, #20c997, #17a2b8);
    transform: translateY(-1px);
    box-shadow: var(--shadow-medium);
}

/* Стили для контента внутри модального окна */
.custom-modal .step-section {
    margin-bottom: 1.5rem;
}

.custom-modal .step-section:last-child {
    margin-bottom: 0;
}

.custom-modal .step-title {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    font-size: 1.1rem;
}

.custom-modal .step-title i {
    margin-right: 0.5rem;
    font-size: 1.2rem;
}

.custom-modal .step-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 0;
}

.custom-modal .conditions-list {
    list-style: none;
    padding-left: 0;
    margin-top: 0.5rem;
}

.custom-modal .conditions-list li {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.custom-modal .conditions-list li:last-child {
    margin-bottom: 0;
}

.custom-modal .conditions-list li i {
    margin-right: 0.5rem;
    font-size: 0.75rem;
}

.custom-modal .info-box {
    background: linear-gradient(135deg, var(--primary-color-light), var(--accent-color-light));
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-top: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    border: 1px solid var(--primary-color);
}

.custom-modal .info-icon {
    color: var(--primary-color);
    font-size: 1.5rem;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.custom-modal .info-content {
    color: var(--text-primary);
    line-height: 1.6;
}

.custom-modal .info-content strong {
    color: var(--primary-color);
}

/* ===== УНИВЕРСАЛЬНЫЕ СТИЛИ ДЛЯ ALERT'ОВ ===== */

/* Контейнер для alert'ов */
.custom-alert-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 400px;
    width: 100%;
}

/* Базовые стили alert'а */
.custom-alert {
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-heavy);
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-left: 4px solid;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.custom-alert.show {
    transform: translateX(0);
    opacity: 1;
}

.custom-alert.hide {
    transform: translateX(100%);
    opacity: 0;
}

/* Типы alert'ов */
.custom-alert.alert-success {
    border-left-color: #28a745;
    background: #d4edda;
    border-color: #c3e6cb;
}

.custom-alert.alert-error {
    border-left-color: #dc3545;
    background: #f8d7da;
    border-color: #f5c6cb;
}

.custom-alert.alert-warning {
    border-left-color: #ffc107;
    background: #fff3cd;
    border-color: #ffeaa7;
}

.custom-alert.alert-info {
    border-left-color: #17a2b8;
    background: #d1ecf1;
    border-color: #bee5eb;
}

/* Заголовок alert'а */
.custom-alert-title {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.custom-alert.alert-success .custom-alert-title {
    color: #155724;
}

.custom-alert.alert-error .custom-alert-title {
    color: #721c24;
}

.custom-alert.alert-warning .custom-alert-title {
    color: #856404;
}

.custom-alert.alert-info .custom-alert-title {
    color: #0c5460;
}

/* Сообщение alert'а */
.custom-alert-message {
    color: #155724;
    line-height: 1.5;
    margin: 0;
}

/* Кнопка закрытия */
.custom-alert-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.custom-alert-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: var(--text-primary);
}

/* Прогресс-бар для автоматического закрытия */
.custom-alert-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: rgba(0, 0, 0, 0.1);
    transition: width linear;
}

.custom-alert.alert-success .custom-alert-progress {
    background: #28a745;
}

.custom-alert.alert-error .custom-alert-progress {
    background: #dc3545;
}

.custom-alert.alert-warning .custom-alert-progress {
    background: #ffc107;
}

.custom-alert.alert-info .custom-alert-progress {
    background: #17a2b8;
}

/* Адаптивность */
@media (max-width: 768px) {
    .custom-alert-container {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }

    .custom-modal .modal-dialog {
        margin: 1rem;
    }

    .custom-modal .modal-content {
        margin: 0;
    }
}

/* Анимации */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.custom-alert.slide-in {
    animation: slideInRight 0.3s ease forwards;
}

.custom-alert.slide-out {
    animation: slideOutRight 0.3s ease forwards;
}
