/**
 * Expiry Handler Styles
 * CREAMS - Community-based REhAbilitation Management System
 */

/* ===========================
   EXPIRY NOTIFICATIONS
   =========================== */

.expiry-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    max-width: 400px;
    min-width: 320px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border: 1px solid #e1e4e8;
    z-index: 10000;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

.expiry-notification.hide {
    opacity: 0;
    transform: translateX(100%);
}

/* Notification Types */
.expiry-notification.expiry-warning {
    border-left: 4px solid #ff6b35;
}

.expiry-notification.expiry-info {
    border-left: 4px solid #32bdea;
}

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

.expiry-notification.expiry-success {
    border-left: 4px solid #2ed573;
}

/* Notification Content */
.notification-content {
    display: flex;
    align-items: flex-start;
    padding: 16px 20px;
    gap: 12px;
    position: relative;
}

.notification-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    margin-top: 2px;
}

.expiry-warning .notification-icon {
    color: #ff6b35;
}

.expiry-info .notification-icon {
    color: #32bdea;
}

.expiry-error .notification-icon {
    color: #ff4757;
}

.expiry-success .notification-icon {
    color: #2ed573;
}

.notification-text {
    flex: 1;
    min-width: 0;
}

.notification-title {
    font-weight: 600;
    font-size: 14px;
    color: #1f2937;
    margin-bottom: 4px;
    line-height: 1.4;
}

.notification-message {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.5;
    margin: 0;
}

.notification-dismiss {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 18px;
    cursor: pointer;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.notification-dismiss:hover {
    background: #f3f4f6;
    color: #4b5563;
}

.notification-dismiss:active {
    background: #e5e7eb;
}

/* Multiple notifications stacking */
.expiry-notification:nth-of-type(2) {
    top: 100px;
}

.expiry-notification:nth-of-type(3) {
    top: 180px;
}

.expiry-notification:nth-of-type(4) {
    top: 260px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .expiry-notification {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
        min-width: auto;
    }
    
    .expiry-notification:nth-of-type(2) {
        top: 80px;
    }
    
    .expiry-notification:nth-of-type(3) {
        top: 150px;
    }
    
    .expiry-notification:nth-of-type(4) {
        top: 220px;
    }
    
    .notification-content {
        padding: 14px 16px;
    }
    
    .notification-title {
        font-size: 13px;
    }
    
    .notification-message {
        font-size: 12px;
    }
}

/* Animation keyframes */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .expiry-notification {
        background: #1f2937;
        border-color: #374151;
        color: #f9fafb;
    }
    
    .notification-title {
        color: #f9fafb;
    }
    
    .notification-message {
        color: #d1d5db;
    }
    
    .notification-dismiss {
        color: #6b7280;
    }
    
    .notification-dismiss:hover {
        background: #374151;
        color: #9ca3af;
    }
    
    .notification-dismiss:active {
        background: #4b5563;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .expiry-notification {
        border-width: 2px;
    }
    
    .expiry-warning {
        border-left-color: #ff4500;
    }
    
    .expiry-error {
        border-left-color: #dc143c;
    }
    
    .notification-title {
        font-weight: 700;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .expiry-notification {
        transition: opacity 0.2s ease;
        transform: none;
    }
    
    .expiry-notification.show {
        transform: none;
    }
    
    .expiry-notification.hide {
        transform: none;
    }
}