/**
 * Global Notification System Styles
 * Include this CSS file on any page that uses notifications
 */

/* Notification styles - Global improved design */
.notification-popup {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px 48px 16px 20px;
    max-width: 320px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 12px;
    transform: translateX(400px);
    opacity: 0;
    transition: none;
    z-index: 1000;
    cursor: default;
    user-select: none;
}

.notification-popup.show {
    animation: slideIn 0.3s ease-out forwards;
}

.notification-popup.removing {
    animation: slideDownAndOut 0.5s ease-in forwards;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideDownAndOut {
    from {
        transform: translateX(0) translateY(0);
        opacity: 1;
    }
    to {
        transform: translateX(0) translateY(300px);
        opacity: 0;
    }
}

.notification-popup.success {
    border-color: rgba(16, 185, 129, 0.3);
    background: var(--bg-secondary);
}

.notification-popup.success::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #10b981;
    border-radius: 12px 0 0 12px;
}

.notification-popup.error {
    border-color: rgba(239, 68, 68, 0.3);
    background: var(--bg-secondary);
}

.notification-popup.error::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #ef4444;
    border-radius: 12px 0 0 12px;
}

.notification-message {
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.4;
    word-wrap: break-word;
    word-break: break-word;
    max-width: 100%;
}

.notification-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    font-size: 16px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.notification-close:hover {
    background: var(--glass-hover);
    color: var(--text-primary);
}

/* Mobile responsive */
@media (max-width: 768px) {
    .notification-popup {
        bottom: 16px;
        right: 16px;
        left: 16px;
        max-width: none;
    }
}

/* Dark theme fallback variables for pages that don't have them */
:root {
    --bg-secondary: #1a202c;
    --border: #2d3748;
    --text-primary: #f7fafc;
    --text-secondary: #a0aec0;
    --glass-hover: rgba(255, 255, 255, 0.05);
}

/* Light theme */
[data-theme="light"] {
    --bg-secondary: #ffffff;
    --border: #e5e7eb;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --glass-hover: rgba(0, 0, 0, 0.05);
}

/* Custom Form Validation Styling - GLOBAL */
input.error, select.error, textarea.error {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
    background-color: rgba(239, 68, 68, 0.05) !important;
    animation: shake 0.3s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Inline Error Messages - GLOBAL */
.field-error {
    display: block;
    color: #ef4444;
    font-size: 0.75rem;
    margin-top: 0.25rem;
    margin-left: 0.25rem;
    font-weight: 500;
    opacity: 0;
    transform: translateY(-5px);
    animation: errorSlideIn 0.3s ease-out forwards;
}

@keyframes errorSlideIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.field-error.removing {
    animation: errorSlideOut 0.2s ease-in forwards;
}

@keyframes errorSlideOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-5px);
    }
}