/**
 * Modern Notification System Styles
 * Toast notifications and confirmation modals
 */

/* ===== TOAST NOTIFICATIONS ===== */

.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.toast {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.05);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 320px;
    max-width: 500px;
    pointer-events: auto;
    position: relative;
    overflow: hidden;
}

.toast::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
}

.toast-success::before {
    background: #10b981;
}

.toast-error::before {
    background: #ef4444;
}

.toast-warning::before {
    background: #f59e0b;
}

.toast-info::before {
    background: #3b82f6;
}

.toast-icon {
    font-size: 24px;
    line-height: 1;
    flex-shrink: 0;
}

.toast-content {
    flex: 1;
    min-width: 0;
}

.toast-message {
    font-size: 14px;
    line-height: 1.5;
    color: #1f2937;
    word-wrap: break-word;
    white-space: pre-wrap;
}

.toast-close {
    background: none;
    border: none;
    font-size: 24px;
    line-height: 1;
    color: #9ca3af;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
    flex-shrink: 0;
}

.toast-close:hover {
    background: #f3f4f6;
    color: #4b5563;
}

/* Toast Animations */
.toast-enter {
    opacity: 0;
    transform: translateX(100%);
}

.toast-visible {
    opacity: 1;
    transform: translateX(0);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.toast-exit {
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== CONFIRMATION MODALS ===== */

.notification-modal-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999998;
    pointer-events: none;
}

.notification-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999998;
    pointer-events: auto;
}

.notification-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.notification-modal-content {
    position: relative;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 480px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.notification-modal-header {
    padding: 24px 24px 16px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    border-bottom: 1px solid #e5e7eb;
}

.notification-modal-icon {
    font-size: 32px;
    line-height: 1;
    flex-shrink: 0;
}

.notification-modal-title {
    font-size: 20px;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
    flex: 1;
}

.notification-modal-body {
    padding: 24px;
    overflow-y: auto;
}

.notification-modal-message {
    font-size: 15px;
    line-height: 1.6;
    color: #4b5563;
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.notification-modal-footer {
    padding: 16px 24px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
}

.notification-modal-btn {
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    outline: none;
}

.notification-modal-btn:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

.notification-modal-btn-cancel {
    background: #f3f4f6;
    color: #4b5563;
}

.notification-modal-btn-cancel:hover {
    background: #e5e7eb;
}

.notification-modal-btn-confirm {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.notification-modal-btn-confirm:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.notification-modal-btn-single {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    min-width: 100px;
}

/* Modal Type Specific Styles */
.notification-modal-warning .notification-modal-btn-confirm {
    background: #f59e0b;
}

.notification-modal-warning .notification-modal-btn-confirm:hover {
    background: #d97706;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.notification-modal-danger .notification-modal-btn-confirm {
    background: #ef4444;
}

.notification-modal-danger .notification-modal-btn-confirm:hover {
    background: #dc2626;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

.notification-modal-info .notification-modal-btn-confirm {
    background: #3b82f6;
}

.notification-modal-info .notification-modal-btn-confirm:hover {
    background: #2563eb;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

/* Modal Animations */
.notification-modal-enter .notification-modal-overlay {
    opacity: 0;
}

.notification-modal-enter .notification-modal-content {
    opacity: 0;
    transform: scale(0.95) translateY(-20px);
}

.notification-modal-visible .notification-modal-overlay {
    opacity: 1;
    transition: opacity 0.3s ease;
}

.notification-modal-visible .notification-modal-content {
    opacity: 1;
    transform: scale(1) translateY(0);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.notification-modal-exit .notification-modal-overlay {
    opacity: 0;
    transition: opacity 0.2s ease;
}

.notification-modal-exit .notification-modal-content {
    opacity: 0;
    transform: scale(0.95) translateY(-20px);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== RESPONSIVE DESIGN ===== */

@media (max-width: 640px) {
    .toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
    }

    .toast {
        min-width: auto;
        width: 100%;
    }

    .notification-modal-content {
        width: 95%;
        max-width: none;
    }

    .notification-modal-header {
        padding: 20px 20px 12px 20px;
    }

    .notification-modal-body {
        padding: 20px;
    }

    .notification-modal-footer {
        padding: 12px 20px;
        flex-direction: column-reverse;
    }

    .notification-modal-btn {
        width: 100%;
    }
}

/* ===== DARK MODE SUPPORT ===== */

@media (prefers-color-scheme: dark) {
    .toast {
        background: #1f2937;
        box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.1);
    }

    .toast-message {
        color: #e5e7eb;
    }

    .toast-close {
        color: #9ca3af;
    }

    .toast-close:hover {
        background: #374151;
        color: #e5e7eb;
    }

    .notification-modal-content {
        background: #1f2937;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    }

    .notification-modal-header {
        border-bottom-color: #374151;
    }

    .notification-modal-title {
        color: #f3f4f6;
    }

    .notification-modal-message {
        color: #d1d5db;
    }

    .notification-modal-footer {
        border-top-color: #374151;
        background: #111827;
    }

    .notification-modal-btn-cancel {
        background: #374151;
        color: #e5e7eb;
    }

    .notification-modal-btn-cancel:hover {
        background: #4b5563;
    }
}

/* ===== ACCESSIBILITY ===== */

@media (prefers-reduced-motion: reduce) {
    .toast-enter,
    .toast-visible,
    .toast-exit,
    .notification-modal-enter .notification-modal-overlay,
    .notification-modal-enter .notification-modal-content,
    .notification-modal-visible .notification-modal-overlay,
    .notification-modal-visible .notification-modal-content,
    .notification-modal-exit .notification-modal-overlay,
    .notification-modal-exit .notification-modal-content {
        transition: none;
    }
}

/* Focus visible for keyboard navigation */
.notification-modal-btn:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

.toast-close:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

