/* Notification Service Styles */

/* Container */
.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    pointer-events: none;
    max-width: 420px;
    width: 100%;
}

@media (max-width: 768px) {
    .notification-container {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

/* Notification */
.notification {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    margin-bottom: 12px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
    pointer-events: auto;
    transform: translateX(calc(100% + 30px));
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 100%;
    word-wrap: break-word;
}

.notification.show {
    transform: translateX(0);
    opacity: 1;
}

.notification.hide {
    transform: translateX(calc(100% + 30px));
    opacity: 0;
}

/* Notification Icon */
.notification__icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Notification Content */
.notification__content {
    flex: 1;
    min-width: 0;
}

.notification__title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
    color: #1a1a1a;
}

.notification__message {
    font-size: 14px;
    line-height: 1.5;
    color: #4a4a4a;
    white-space: pre-wrap;
}

/* Close Button */
.notification__close {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    color: #6b7280;
    transition: all 0.2s;
}

.notification__close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #1a1a1a;
}

.notification__close:active {
    transform: scale(0.95);
}

/* Notification Types */
.notification--success {
    border-left: 4px solid #10b981;
}

.notification--success .notification__icon {
    color: #10b981;
}

.notification--error {
    border-left: 4px solid #ef4444;
}

.notification--error .notification__icon {
    color: #ef4444;
}

.notification--warning {
    border-left: 4px solid #f59e0b;
}

.notification--warning .notification__icon {
    color: #f59e0b;
}

.notification--info {
    border-left: 4px solid #3b82f6;
}

.notification--info .notification__icon {
    color: #3b82f6;
}

/* Notification Overlay (for confirm dialogs) */
.notification-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.notification-overlay.show {
    opacity: 1;
}

/* Notification Dialog */
.notification-dialog {
    background: #ffffff;
    border-radius: 12px;
    padding: 24px;
    max-width: 440px;
    width: 100%;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: auto;
    position: relative;
    z-index: 10001;
}

.notification-overlay.show .notification-dialog {
    transform: scale(1);
}

.notification-dialog__icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.notification-dialog__icon--success {
    background: #d1fae5;
    color: #10b981;
}

.notification-dialog__icon--error {
    background: #fee2e2;
    color: #ef4444;
}

.notification-dialog__icon--warning {
    background: #fef3c7;
    color: #f59e0b;
}

.notification-dialog__icon--info {
    background: #dbeafe;
    color: #3b82f6;
}

.notification-dialog__title {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    text-align: center;
    margin-bottom: 8px;
}

.notification-dialog__message {
    font-size: 14px;
    line-height: 1.6;
    color: #4a4a4a;
    text-align: center;
    margin-bottom: 24px;
    white-space: pre-wrap;
}

.notification-dialog__actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.notification-dialog__btn {
    padding: 10px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    min-width: 100px;
    pointer-events: auto;
    position: relative;
    z-index: 10002;
}

.notification-dialog__btn--cancel {
    background: #f3f4f6;
    color: #4b5563;
}

.notification-dialog__btn--cancel:hover {
    background: #e5e7eb;
}

.notification-dialog__btn--confirm {
    background: var(--color-primary, #dc2626);
    color: #ffffff;
}

.notification-dialog__btn--confirm:hover {
    background: var(--color-primary-dark, #b91c1c);
}

.notification-dialog__btn:active {
    transform: scale(0.98);
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    .notification {
        background: #1f2937;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.1);
    }

    .notification__title {
        color: #f9fafb;
    }

    .notification__message {
        color: #d1d5db;
    }

    .notification__close {
        color: #9ca3af;
    }

    .notification__close:hover {
        background: rgba(255, 255, 255, 0.1);
        color: #f9fafb;
    }

    .notification-dialog {
        background: #1f2937;
    }

    .notification-dialog__title {
        color: #f9fafb;
    }

    .notification-dialog__message {
        color: #d1d5db;
    }

    .notification-dialog__btn--cancel {
        background: #374151;
        color: #d1d5db;
    }

    .notification-dialog__btn--cancel:hover {
        background: #4b5563;
    }
}

/* Animation for multiple notifications */
@keyframes slideInRight {
    from {
        transform: translateX(calc(100% + 30px));
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

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

/* Accessibility */
.notification:focus-within {
    outline: 2px solid var(--color-primary, #dc2626);
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .notification-container,
    .notification-overlay {
        display: none !important;
    }
}
