/* Notification System Styles */
/* Notification Container */
.notification-container {
position: fixed;
top: 80px;
right: 20px;
z-index: 99999;
display: flex;
flex-direction: column;
gap: 12px;
pointer-events: none;
max-width: 400px;
}
/* Individual Notification */
.notification {
background-color: var(--card-light, #ffffff);
border-radius: 12px;
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
overflow: hidden;
transform: translateX(120%);
transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
opacity: 0;
pointer-events: auto;
min-width: 300px;
max-width: 400px;
position: relative;
}
[data-theme="dark"] .notification,
body.dark-mode .notification {
background-color: var(--bg-card, #2a2a2a);
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}
.notification-show {
transform: translateX(0);
opacity: 1;
}
.notification-hide {
transform: translateX(120%);
opacity: 0;
}
/* Notification Content */
.notification-content {
display: flex;
align-items: center;
gap: 12px;
padding: 16px 20px;
position: relative;
}
.notification-icon {
font-size: 24px;
flex-shrink: 0;
}
.notification-message {
flex: 1;
font-size: 15px;
line-height: 1.5;
color: var(--text-light, #333);
}
[data-theme="dark"] .notification-message,
body.dark-mode .notification-message {
color: var(--text-primary, #ffffff);
}
.notification-close {
background: none;
border: none;
color: var(--text-light, #666);
cursor: pointer;
padding: 4px;
border-radius: 4px;
transition: all 0.2s ease;
display: flex;
align-items: center;
justify-content: center;
width: 24px;
height: 24px;
flex-shrink: 0;
}
[data-theme="dark"] .notification-close,
body.dark-mode .notification-close {
color: var(--text-secondary, #aaa);
}
.notification-close:hover {
background-color: rgba(0, 0, 0, 0.1);
}
[data-theme="dark"] .notification-close:hover,
body.dark-mode .notification-close:hover {
background-color: rgba(255, 255, 255, 0.1);
}
/* Notification Progress Bar */
.notification-progress {
height: 4px;
background-color: rgba(0, 0, 0, 0.1);
position: relative;
overflow: hidden;
}
[data-theme="dark"] .notification-progress,
body.dark-mode .notification-progress {
background-color: rgba(255, 255, 255, 0.1);
}
.notification-progress::before {
content: '';
position: absolute;
top: 0;
left: 0;
height: 100%;
width: 100%;
background-color: currentColor;
transform-origin: left;
}
@keyframes progress {
from {
transform: scaleX(1);
}
to {
transform: scaleX(0);
}
}
/* Notification Types */
.notification-success {
border-left: 4px solid var(--success, #28a745);
}
.notification-success .notification-icon {
color: var(--success, #28a745);
}
.notification-success .notification-progress::before {
background-color: var(--success, #28a745);
}
.notification-error {
border-left: 4px solid var(--danger, #dc3545);
}
.notification-error .notification-icon {
color: var(--danger, #dc3545);
}
.notification-error .notification-progress::before {
background-color: var(--danger, #dc3545);
}
.notification-warning {
border-left: 4px solid var(--warning, #ffa500);
}
.notification-warning .notification-icon {
color: var(--warning, #ffa500);
}
.notification-warning .notification-progress::before {
background-color: var(--warning, #ffa500);
}
.notification-info {
border-left: 4px solid var(--secondary-color, #0066cc);
}
.notification-info .notification-icon {
color: var(--secondary-color, #0066cc);
}
.notification-info .notification-progress::before {
background-color: var(--secondary-color, #0066cc);
}
/* Loading Notification */
.notification-loading {
border-left: 4px solid var(--primary-color, #00a651);
}
.notification-spinner {
width: 24px;
height: 24px;
border: 3px solid rgba(0, 166, 81, 0.2);
border-top-color: var(--primary-color, #00a651);
border-radius: 50%;
animation: spin 0.8s linear infinite;
flex-shrink: 0;
}
@keyframes spin {
to {
transform: rotate(360deg);
}
}
/* Modal Overlay */
.notification-modal-overlay {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: rgba(0, 0, 0, 0.5);
display: flex;
align-items: center;
justify-content: center;
z-index: 99998;
opacity: 0;
transition: opacity 0.3s ease;
backdrop-filter: blur(2px);
}
.notification-modal-overlay-show {
opacity: 1;
}
/* Modal */
.notification-modal {
background-color: var(--card-light, #ffffff);
border-radius: 16px;
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
max-width: 500px;
width: 90%;
transform: scale(0.9);
opacity: 0;
transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}
[data-theme="dark"] .notification-modal,
body.dark-mode .notification-modal {
background-color: var(--bg-card, #2a2a2a);
}
.notification-modal-show {
transform: scale(1);
opacity: 1;
}
.notification-modal-hide {
transform: scale(0.9);
opacity: 0;
}
.notification-modal-content {
padding: 0;
}
.notification-modal-header {
display: flex;
align-items: center;
gap: 12px;
padding: 24px 24px 16px 24px;
border-bottom: 1px solid var(--border-light, #e0e0e0);
}
[data-theme="dark"] .notification-modal-header,
body.dark-mode .notification-modal-header {
border-bottom-color: var(--border-primary, #444);
}
.notification-modal-header i {
font-size: 28px;
color: var(--color-primary, #00a651);
}
.notification-modal-header h3 {
margin: 0;
font-size: 20px;
color: var(--text-primary, #333);
}
[data-theme="dark"] .notification-modal-header h3,
body.dark-mode .notification-modal-header h3 {
color: var(--text-primary, #ffffff);
}
.notification-modal-body {
padding: 24px;
}
.notification-modal-body p {
margin: 0;
font-size: 16px;
line-height: 1.6;
color: var(--text-secondary, #555);
}
[data-theme="dark"] .notification-modal-body p,
body.dark-mode .notification-modal-body p {
color: var(--text-secondary, #ccc);
}
.notification-modal-footer {
display: flex;
gap: 12px;
padding: 16px 24px 24px 24px;
justify-content: flex-end;
}
.notification-modal-btn {
padding: 12px 24px;
border-radius: 8px;
border: none;
font-size: 15px;
font-weight: 600;
cursor: pointer;
display: flex;
align-items: center;
gap: 8px;
transition: all 0.2s ease;
min-width: 100px;
justify-content: center;
}
.notification-modal-btn i {
font-size: 16px;
}
.notification-modal-btn-cancel {
background-color: transparent;
color: var(--text-light, #666);
border: 1px solid var(--border-light, #ddd);
}
[data-theme="dark"] .notification-modal-btn-cancel,
body.dark-mode .notification-modal-btn-cancel {
color: var(--text-secondary, #aaa);
border-color: var(--border-primary, #555);
}
.notification-modal-btn-cancel:hover {
background-color: rgba(0, 0, 0, 0.05);
}
[data-theme="dark"] .notification-modal-btn-cancel:hover,
body.dark-mode .notification-modal-btn-cancel:hover {
background-color: rgba(255, 255, 255, 0.05);
}
.notification-modal-btn-confirm {
background-color: var(--primary-color, #00a651);
color: white;
}
.notification-modal-btn-confirm:hover {
background-color: #008840;
transform: translateY(-2px);
box-shadow: 0 4px 12px rgba(0, 166, 81, 0.3);
}
/* Mobile Responsiveness */
@media (max-width: 768px) {
.notification-container {
top: 70px;
right: 10px;
left: 10px;
max-width: none;
}
.notification {
    min-width: unset;
    max-width: none;
}

.notification-content {
    padding: 14px 16px;
}

.notification-message {
    font-size: 14px;
}

.notification-modal {
    width: 95%;
    margin: 0 10px;
}

.notification-modal-header {
    padding: 20px 20px 14px 20px;
}

.notification-modal-header h3 {
    font-size: 18px;
}

.notification-modal-body {
    padding: 20px;
}

.notification-modal-body p {
    font-size: 15px;
}

.notification-modal-footer {
    flex-direction: column-reverse;
    padding: 14px 20px 20px 20px;
}

.notification-modal-btn {
    width: 100%;
    min-width: unset;
}
}
/* Small Mobile */
@media (max-width: 480px) {
.notification-container {
top: 60px;
right: 8px;
left: 8px;
}
.notification-icon {
    font-size: 20px;
}

.notification-message {
    font-size: 13px;
}
}
/* Animations for entrance */
@keyframes slideInRight {
from {
transform: translateX(120%);
opacity: 0;
}
to {
transform: translateX(0);
opacity: 1;
}
}
@keyframes slideOutRight {
from {
transform: translateX(0);
opacity: 1;
}
to {
transform: translateX(120%);
opacity: 0;
}
}
/* Accessibility */
.notification-close:focus,
.notification-modal-btn:focus {
outline: 2px solid var(--primary-color, #00a651);
outline-offset: 2px;
}
/* High contrast support */
@media (prefers-contrast: high) {
.notification {
border: 2px solid currentColor;
}
.notification-modal {
    border: 2px solid var(--primary-color, #00a651);
}
}
/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
.notification,
.notification-modal,
.notification-modal-overlay {
transition: none;
animation: none;
}
.notification-spinner {
    animation: none;
}
}

/* ==================== Branded Auth Notifications ==================== */

/* Base auth notification styling */
.notification.notification-auth {
    border-radius: 12px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Auth Error Notification - Dark Mode */
[data-theme="dark"] .notification-error.notification-auth {
    background: linear-gradient(135deg,
        var(--bg-card, #072C2A) 0%,
        rgba(243, 48, 67, 0.1) 100%);
    border: 1px solid rgba(243, 48, 67, 0.3);
    border-left: 4px solid var(--color-danger, #F33043);
    box-shadow: 0 4px 24px rgba(243, 48, 67, 0.15),
                0 0 0 1px rgba(243, 48, 67, 0.1);
}

/* Auth Error Notification - Light Mode */
[data-theme="light"] .notification-error.notification-auth {
    background: linear-gradient(135deg,
        #FFFFFF 0%,
        rgba(239, 68, 68, 0.05) 100%);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-left: 4px solid var(--color-danger, #EF4444);
    box-shadow: 0 4px 24px rgba(239, 68, 68, 0.1),
                0 0 0 1px rgba(239, 68, 68, 0.05);
}

/* Auth Success Notification - Dark Mode */
[data-theme="dark"] .notification-success.notification-auth {
    background: linear-gradient(135deg,
        var(--bg-card, #072C2A) 0%,
        rgba(74, 222, 128, 0.1) 100%);
    border: 1px solid rgba(74, 222, 128, 0.3);
    border-left: 4px solid var(--color-success, #4ADE80);
    box-shadow: 0 4px 24px rgba(74, 222, 128, 0.15),
                0 0 0 1px rgba(74, 222, 128, 0.1);
}

/* Auth Success Notification - Light Mode */
[data-theme="light"] .notification-success.notification-auth {
    background: linear-gradient(135deg,
        #FFFFFF 0%,
        rgba(16, 185, 129, 0.05) 100%);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-left: 4px solid var(--color-success, #10B981);
    box-shadow: 0 4px 24px rgba(16, 185, 129, 0.1),
                0 0 0 1px rgba(16, 185, 129, 0.05);
}

/* Auth notification icon styling */
.notification-auth .notification-icon {
    width: 36px;
    height: 36px;
    min-width: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 18px;
}

.notification-error.notification-auth .notification-icon {
    background: rgba(243, 48, 67, 0.15);
    color: var(--color-danger, #F33043);
}

[data-theme="light"] .notification-error.notification-auth .notification-icon {
    background: rgba(239, 68, 68, 0.1);
    color: var(--color-danger, #EF4444);
}

.notification-success.notification-auth .notification-icon {
    background: rgba(74, 222, 128, 0.15);
    color: var(--color-success, #4ADE80);
}

[data-theme="light"] .notification-success.notification-auth .notification-icon {
    background: rgba(16, 185, 129, 0.1);
    color: var(--color-success, #10B981);
}

/* Auth notification message styling */
.notification-auth .notification-message {
    font-family: 'Cairo', 'Janna LT', 'Tajawal', sans-serif;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.5;
    direction: rtl;
    text-align: right;
}

[data-theme="dark"] .notification-auth .notification-message {
    color: var(--text-primary, #FFFFFF);
}

[data-theme="light"] .notification-auth .notification-message {
    color: var(--text-primary, #102320);
}

/* Auth notification content layout */
.notification-auth .notification-content {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
}

/* Auth notification close button */
.notification-auth .notification-close {
    background: transparent;
    border: none;
    padding: 6px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

[data-theme="dark"] .notification-auth .notification-close {
    color: rgba(255, 255, 255, 0.6);
}

[data-theme="light"] .notification-auth .notification-close {
    color: rgba(16, 35, 32, 0.6);
}

.notification-auth .notification-close:hover {
    background: rgba(128, 128, 128, 0.15);
}

/* Auth notification progress bar */
.notification-auth .notification-progress {
    height: 3px;
    border-radius: 0 0 12px 12px;
    overflow: hidden;
}

.notification-error.notification-auth .notification-progress {
    background: rgba(243, 48, 67, 0.2);
}

.notification-error.notification-auth .notification-progress::after {
    content: '';
    display: block;
    height: 100%;
    background: var(--color-danger, #F33043);
    transform-origin: left;
}

.notification-success.notification-auth .notification-progress {
    background: rgba(74, 222, 128, 0.2);
}

.notification-success.notification-auth .notification-progress::after {
    content: '';
    display: block;
    height: 100%;
    background: var(--color-success, #4ADE80);
    transform-origin: left;
}

/* ==================== Error Modal Styles (Matching Delete Modal Design) ==================== */

/* Error Modal Overlay */
.error-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.error-modal-overlay.active {
    display: flex;
}

/* Error Modal Container */
.error-modal {
    width: 512px;
    max-width: calc(100vw - 32px);
    border-radius: 8px;
    animation: errorModalFadeIn 0.3s ease;
}

/* Error Modal Wrapper */
.error-modal-wrapper {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 24px;
    background: #072C2A;
    border-radius: 8px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.10), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Light mode modal background */
[data-theme="light"] .error-modal-wrapper {
    background: #FFFFFF;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.10), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Modal fade in animation */
@keyframes errorModalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Icon Container - Light red background with red icon */
.error-modal-icon-container {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(243, 48, 67, 0.15);
    border-radius: 24px;
    align-self: flex-end;
}

[data-theme="light"] .error-modal-icon-container {
    background: #FEE2E2;
}

.error-modal-icon-container svg,
.error-modal-icon-container i {
    width: 24px;
    height: 24px;
    font-size: 24px;
    color: #F33043;
}

/* Modal Text Content */
.error-modal-text {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-end;
    width: 100%;
}

/* Modal Title */
.error-modal-title {
    color: #FFFFFF;
    font-family: 'Janna LT', sans-serif;
    font-size: 18px;
    font-weight: 700;
    line-height: 24px;
    text-align: right;
    width: 100%;
    margin: 0;
}

[data-theme="light"] .error-modal-title {
    color: #111827;
}

/* Modal Message */
.error-modal-message {
    color: rgba(255, 255, 255, 0.7);
    font-family: 'Janna LT', sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
    text-align: right;
    width: 100%;
    margin: 0;
}

[data-theme="light"] .error-modal-message {
    color: #6B7280;
}

/* Modal Actions */
.error-modal-actions {
    display: flex;
    gap: 12px;
    width: 100%;
}

/* Modal Button Base */
.error-modal-btn {
    flex: 1;
    display: flex;
    padding: 9px 17px;
    justify-content: center;
    align-items: center;
    border-radius: 6px;
    font-family: 'Janna LT', sans-serif;
    font-size: 14px;
    line-height: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

/* Close/OK Button (Red - Primary action for error) */
.error-modal-btn-close {
    background: #F33043;
    border: 1px solid #F33043;
    color: #FFFFFF;
    font-weight: 700;
}

.error-modal-btn-close:hover {
    background: #D12038;
    border-color: #D12038;
}

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

/* Responsive */
@media (max-width: 768px) {
    .error-modal {
        width: calc(100vw - 32px);
    }

    .error-modal-wrapper {
        padding: 20px;
    }

    .error-modal-actions {
        flex-direction: column-reverse;
    }

    .error-modal-btn {
        width: 100%;
    }
}
