/**
 * AILMS Modal Notification System Styles
 * Version: 2.1.0
 */

/* ============================================
   Modal Overlay
   ============================================ */
.ailms-notify-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1000001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.ailms-notify-overlay.show {
    opacity: 1;
    visibility: visible;
}

.ailms-notify-overlay.hide {
    opacity: 0;
    visibility: hidden;
}

/* ============================================
   Modal Container
   ============================================ */
.ailms-notify-modal {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    max-width: 420px;
    width: 100%;
    padding: 32px;
    text-align: center;
    transform: translateY(-20px) scale(0.95);
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
}

.ailms-notify-overlay.show .ailms-notify-modal {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.ailms-notify-overlay.hide .ailms-notify-modal {
    transform: translateY(20px) scale(0.95);
    opacity: 0;
}

/* ============================================
   Modal Icon
   ============================================ */
.ailms-notify-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: ailms-icon-bounce 0.5s ease-out 0.2s both;
}

@keyframes ailms-icon-bounce {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.ailms-notify-icon svg {
    width: 40px;
    height: 40px;
}

/* Icon colors by type */
.ailms-notify-info .ailms-notify-icon {
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
    color: #0284c7;
}

.ailms-notify-success .ailms-notify-icon {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    color: #16a34a;
}

.ailms-notify-error .ailms-notify-icon {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #dc2626;
}

.ailms-notify-warning .ailms-notify-icon {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #d97706;
}

/* ============================================
   Modal Content
   ============================================ */
.ailms-notify-content {
    margin-bottom: 24px;
}

.ailms-notify-title {
    font-size: 22px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 12px 0;
    line-height: 1.3;
}

.ailms-notify-message {
    font-size: 15px;
    color: #64748b;
    margin: 0;
    line-height: 1.6;
    word-wrap: break-word;
}

/* ============================================
   Modal Actions
   ============================================ */
.ailms-notify-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.ailms-notify-btn {
    flex: 1;
    max-width: 160px;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    outline: none;
}

.ailms-notify-btn:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

.ailms-notify-btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.4);
}

.ailms-notify-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
}

.ailms-notify-btn-secondary {
    background: #f1f5f9;
    color: #475569;
}

.ailms-notify-btn-secondary:hover {
    background: #e2e8f0;
}

/* Type-specific primary button colors */
.ailms-notify-success .ailms-notify-btn-primary {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    box-shadow: 0 4px 14px rgba(34, 197, 94, 0.4);
}

.ailms-notify-success .ailms-notify-btn-primary:hover {
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.5);
}

.ailms-notify-error .ailms-notify-btn-primary {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.4);
}

.ailms-notify-error .ailms-notify-btn-primary:hover {
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.5);
}

.ailms-notify-warning .ailms-notify-btn-primary {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.4);
}

.ailms-notify-warning .ailms-notify-btn-primary:hover {
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.5);
}

/* ============================================
   Toast Notifications
   ============================================ */
#ailms-toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 1000002;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.ailms-toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    min-width: 320px;
    max-width: 420px;
    pointer-events: auto;
    transform: translateX(120%);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.ailms-toast.show {
    transform: translateX(0);
    opacity: 1;
}

.ailms-toast.hide {
    transform: translateX(120%);
    opacity: 0;
}

.ailms-toast-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
}

.ailms-toast-icon svg {
    width: 24px;
    height: 24px;
}

.ailms-toast-message {
    flex: 1;
    font-size: 14px;
    color: #334155;
    line-height: 1.5;
}

.ailms-toast-close {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border: none;
    background: #f1f5f9;
    border-radius: 8px;
    font-size: 18px;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ailms-toast-close:hover {
    background: #e2e8f0;
    color: #334155;
}

/* Toast type colors */
.ailms-toast-info {
    border-left: 4px solid #3b82f6;
}

.ailms-toast-info .ailms-toast-icon {
    color: #3b82f6;
}

.ailms-toast-success {
    border-left: 4px solid #22c55e;
}

.ailms-toast-success .ailms-toast-icon {
    color: #22c55e;
}

.ailms-toast-error {
    border-left: 4px solid #ef4444;
}

.ailms-toast-error .ailms-toast-icon {
    color: #ef4444;
}

.ailms-toast-warning {
    border-left: 4px solid #f59e0b;
}

.ailms-toast-warning .ailms-toast-icon {
    color: #f59e0b;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 480px) {
    .ailms-notify-overlay {
        padding: 16px;
    }

    .ailms-notify-modal {
        padding: 24px;
        border-radius: 16px;
    }

    .ailms-notify-icon {
        width: 64px;
        height: 64px;
    }

    .ailms-notify-icon svg {
        width: 32px;
        height: 32px;
    }

    .ailms-notify-title {
        font-size: 18px;
    }

    .ailms-notify-message {
        font-size: 14px;
    }

    .ailms-notify-actions {
        flex-direction: column-reverse;
    }

    .ailms-notify-btn {
        max-width: none;
        width: 100%;
    }

    /* Toast on mobile */
    #ailms-toast-container {
        top: auto;
        bottom: 24px;
        right: 16px;
        left: 16px;
    }

    .ailms-toast {
        min-width: auto;
        max-width: none;
        width: 100%;
    }
}

/* ============================================
   Dark Mode Support (if needed in future)
   ============================================ */
@media (prefers-color-scheme: dark) {
    /* Can add dark mode styles here if needed */
}

/* ============================================
   Accessibility
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    .ailms-notify-overlay,
    .ailms-notify-modal,
    .ailms-notify-icon,
    .ailms-toast {
        transition: none;
        animation: none;
    }
}

/* High contrast mode */
@media (forced-colors: active) {
    .ailms-notify-btn {
        border: 2px solid currentColor;
    }
}
