/* modal.css - Минималистичные модальные окна в стиле SFRmatrix */

/* Overlay для модального окна */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease, visibility 0.15s ease;
    padding: 20px;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Само модальное окно */
.modal-dialog {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    padding: 20px;
    max-width: 380px;
    width: 100%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
    transform: scale(0.97);
    transition: transform 0.15s ease;
}

.modal-overlay.active .modal-dialog {
    transform: scale(1);
}

/* Заголовок модального окна */
.modal-header {
    margin-bottom: 12px;
}

/* Убираем иконку - не нужна */
.modal-icon {
    display: none;
}

.modal-title-wrapper {
    width: 100%;
}

.modal-title {
    font-size: 15px;
    font-weight: 500;
    color: #d4d4d4;
    margin: 0;
    line-height: 1.4;
}

.modal-subtitle {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
    line-height: 1.4;
}

/* Контент модального окна */
.modal-content {
    font-size: 13px;
    color: #999;
    line-height: 1.5;
    margin-bottom: 20px;
    border: none;
    background: transparent;
}

/* Кнопки модального окна */
.modal-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.modal-btn {
    padding: 8px 16px;
    border-radius: 6px;
    border: 1px solid #2a2a2a;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    outline: none;
    -webkit-font-smoothing: antialiased;
}

.modal-btn:active {
    transform: scale(0.98);
}

/* Кнопка отмены */
.modal-btn-cancel {
    background: transparent;
    color: #999;
    border: 1px solid #2a2a2a;
}

.modal-btn-cancel:hover {
    background: #252525;
    color: #d4d4d4;
    border-color: #333;
}

/* Кнопка подтверждения (обычная) */
.modal-btn-confirm {
    background: transparent;
    color: #999;
    border: 1px solid #2a2a2a;
}

.modal-btn-confirm:hover {
    background: #668863;
    color: #ffffff;
    border-color: #668863;
}

/* Кнопка подтверждения (опасное действие) */
.modal-btn-danger {
    background: transparent;
    color: #999;
    border: 1px solid #2a2a2a;
}

.modal-btn-danger:hover {
    background: #c53030;
    color: #ffffff;
    border-color: #c53030;
}

/* Кнопка подтверждения (информация) */
.modal-btn-info {
    background: #6b8869;
    color: #ffffff;
    border: 1px solid #6b8869;
}

.modal-btn-info:hover {
    background: #7a9978;
    border-color: #7a9978;
}

/* Адаптация для мобильных устройств */
@media (max-width: 768px) {
    .modal-dialog {
        max-width: 90%;
        padding: 18px;
    }
    
    .modal-title {
        font-size: 14px;
    }
    
    .modal-subtitle {
        font-size: 11px;
    }
    
    .modal-content {
        font-size: 13px;
        margin-bottom: 18px;
    }
    
    .modal-actions {
        flex-direction: row;
    }
    
    .modal-btn {
        flex: 1;
        padding: 10px 16px;
    }
}

/* Предотвращение скролла body когда модалка открыта */
body.modal-open {
    overflow: hidden;
}
