/**
 * Модальные уведомления и подтверждения
 * Непрозрачный оверлей поверх страницы/фрейма
 */

.modal-notify-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 99999 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 20px !important;
    box-sizing: border-box !important;
    /* Непрозрачный фон поверх фрейма */
    background: #1e293b !important;
    background-color: #1e293b !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transition: opacity 0.2s ease !important;
}

.modal-notify-overlay[data-theme="light"] {
    background: #f1f5f9 !important;
    background-color: #f1f5f9 !important;
}

.modal-notify-box {
    background: #ffffff !important;
    background-color: #ffffff !important;
    border: 1px solid #e2e8f0;
    border-radius: 16px !important;
    padding: 32px !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25) !important;
    max-width: 420px !important;
    min-width: 320px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    color: #2d3748 !important;
    text-align: center !important;
    animation: modalNotifyFadeIn 0.25s ease !important;
}

.modal-notify-box.modal-notify-error {
    border-left: 4px solid #dc3545 !important;
}

.modal-notify-box.modal-notify-warning {
    border-left: 4px solid #f59e0b !important;
}

.modal-notify-box.modal-notify-success {
    border-left: 4px solid #22c55e !important;
}

.modal-notify-box.modal-notify-info {
    border-left: 4px solid #3b82f6 !important;
}

.modal-notify-icon {
    font-size: 36px !important;
    line-height: 1 !important;
    margin-bottom: 16px !important;
}

.modal-notify-message {
    font-size: 16px !important;
    line-height: 1.5 !important;
    margin-bottom: 24px !important;
    color: #2d3748 !important;
}

.modal-notify-actions {
    display: flex !important;
    gap: 12px !important;
    justify-content: center !important;
    flex-wrap: wrap !important;
}

.modal-notify-actions .modal-notify-btn {
    padding: 12px 24px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    border: none !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
    font-family: inherit !important;
    min-width: 100px !important;
}

.modal-notify-btn-primary {
    background: #475569 !important;
    color: #ffffff !important;
}

.modal-notify-btn-primary:hover {
    background: #64748b !important;
}

.modal-notify-btn-secondary {
    background: #e2e8f0 !important;
    color: #2d3748 !important;
}

.modal-notify-btn-secondary:hover {
    background: #cbd5e0 !important;
}

.modal-notify-btn-danger {
    background: #dc3545 !important;
    color: #ffffff !important;
}

.modal-notify-btn-danger:hover {
    background: #c82333 !important;
}

@keyframes modalNotifyFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Темная тема */
html.theme-dark .modal-notify-overlay {
    background: #0f172a !important;
    background-color: #0f172a !important;
}

html.theme-dark .modal-notify-overlay[data-theme="light"] {
    background: #1e293b !important;
    background-color: #1e293b !important;
}

html.theme-dark .modal-notify-box {
    background: #1e293b !important;
    background-color: #1e293b !important;
    border-color: #475569 !important;
    color: #f1f5f9 !important;
}

html.theme-dark .modal-notify-message {
    color: #e2e8f0 !important;
}

html.theme-dark .modal-notify-btn-primary {
    background: #475569 !important;
    color: #ffffff !important;
}

html.theme-dark .modal-notify-btn-primary:hover {
    background: #64748b !important;
}

html.theme-dark .modal-notify-btn-secondary {
    background: #334155 !important;
    color: #e2e8f0 !important;
}

html.theme-dark .modal-notify-btn-secondary:hover {
    background: #475569 !important;
}

/* Скрытое состояние */
.modal-notify-overlay.modal-notify-hidden {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

@media (max-width: 480px) {
    .modal-notify-box {
        padding: 24px !important;
        min-width: 280px !important;
    }
    
    .modal-notify-actions {
        flex-direction: column !important;
    }
    
    .modal-notify-actions .modal-notify-btn {
        width: 100% !important;
    }
}
