/**
 * Professional Alert System CSS
 * Modern, animated, and responsive alert notifications
 */

/* Alert Container */
.alert-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    max-width: 400px;
    width: 100%;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

/* Alert Base Styles */
.custom-alert {
    background: #10b981;
    border-radius: 8px;
    overflow: hidden;
    pointer-events: auto;
    opacity: 0;
    transition: none;
    position: relative;
    min-width: 300px;
    max-width: 400px;
    width: auto;
}

/* Show Animation */
.custom-alert.show {
    opacity: 1;
}

/* Hide Animation */
.custom-alert.hide {
    opacity: 0;
    transition: none;
}

/* Alert Content */
.alert-content {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 20px;
    gap: 12px;
}

/* Alert Icon */
.alert-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: white;
}

/* Alert Message */
.alert-message {
    flex: 1;
    font-size: 14px;
    line-height: 1.5;
    color: white;
    font-weight: 600;
}

/* Close Button */
.alert-close {
    flex-shrink: 0;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-size: 14px;
}

.alert-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

/* Progress Bar */
.alert-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    width: 100%;
    transform-origin: left;
}

/* Progress Animation */
@keyframes alertProgress {
    from {
        transform: scaleX(1);
    }
    to {
        transform: scaleX(0);
    }
}

@keyframes gentle-bounce {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-4px);
    }
}

/* SUCCESS ALERT */
.alert-success {
    background: #10b981;
}

.alert-success .alert-progress {
    background: rgba(255, 255, 255, 0.3);
}

/* ERROR ALERT */
.alert-error {
    background: #ef4444;
}

.alert-error .alert-progress {
    background: rgba(255, 255, 255, 0.3);
}

/* WARNING ALERT */
.alert-warning {
    background: #f59e0b;
}

.alert-warning .alert-progress {
    background: rgba(255, 255, 255, 0.3);
}

/* INFO ALERT */
.alert-info {
    background: #3b82f6;
}

.alert-info .alert-progress {
    background: rgba(255, 255, 255, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .alert-container {
        top: 10px;
        max-width: 90%;
        width: 90%;
    }
    
    .custom-alert {
        min-width: 280px;
        max-width: 350px;
    }
    
    .alert-content {
        padding: 14px 16px;
        gap: 10px;
    }
    
    .alert-message {
        font-size: 13px;
    }
    
    .alert-icon {
        width: 18px;
        height: 18px;
        font-size: 14px;
    }
}

/* Dark Mode Support - DISABLED - Force Light Mode */
/* @media (prefers-color-scheme: dark) {
    .alert-success {
        background: #10b981;
    }
    
    .alert-error {
        background: #ef4444;
    }
    
    .alert-warning {
        background: #f59e0b;
    }
    
    .alert-info {
        background: #3b82f6;
    }
} */

/* Hover Effects */
.custom-alert:hover {
    transform: translateY(-1px);
}

/* Multiple Alerts Stacking */
.custom-alert:nth-child(1) { z-index: 10; }
.custom-alert:nth-child(2) { z-index: 9; }
.custom-alert:nth-child(3) { z-index: 8; }
.custom-alert:nth-child(4) { z-index: 7; }
.custom-alert:nth-child(5) { z-index: 6; }

/* Animation for multiple alerts */
.custom-alert:nth-child(n+6) {
    display: none; /* Hide alerts beyond 5 to prevent screen clutter */
}

/* Confirm Dialog Styles */
.alert-confirm-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    visibility: visible;
}

.alert-confirm-modal.show {
    opacity: 1;
    visibility: visible;
}

.alert-confirm-modal.hide {
    opacity: 0;
    visibility: hidden;
}

.alert-confirm-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
}

.alert-confirm-content {
    position: relative;
    background: #f8f9fa;
    border-radius: 16px;
    padding: 24px 20px;
    max-width: 400px;
    width: 90%;
    border: 1px solid rgba(0, 149, 255, 0.08);
    transform: scale(1);
    text-align: center;
}

.alert-confirm-modal.show .alert-confirm-content {
    transform: scale(1);
}

.alert-confirm-icon {
    display: none;
}

.alert-confirm-message {
    font-size: 15px;
    color: #4b5563;
    line-height: 1.5;
    margin-bottom: 24px;
    font-weight: 400;
}

.alert-confirm-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.alert-confirm-cancel,
.alert-confirm-ok {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    min-width: 80px;
    text-align: center;
}

.alert-confirm-cancel {
    background: #f3f4f6;
    color: #6b7280;
    border: 1px solid #d1d5db;
}

.alert-confirm-cancel:hover {
    background: #e5e7eb;
    color: #374151;
}

.alert-confirm-ok {
    background: #0095FF;
    color: white;
}

.alert-confirm-ok:hover {
    background: #0077DD;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 149, 255, 0.3);
}

/* Dark mode support for confirm dialog - DISABLED - Force Light Mode */
/* @media (prefers-color-scheme: dark) {
    .alert-confirm-content {
        background: #1f2937;
    }
    
    .alert-confirm-message {
        color: #f9fafb;
    }
    
    .alert-confirm-cancel {
        background: #374151;
        color: #d1d5db;
    }
    
    .alert-confirm-cancel:hover {
        background: #4b5563;
        color: #f9fafb;
    }
} */

/* Responsive design for confirm dialog */
@media (max-width: 768px) {
    .alert-confirm-content {
        padding: 20px 16px;
        margin: 16px;
        max-width: 320px;
    }
    
    .alert-confirm-icon i {
        font-size: 32px;
    }
    
    .alert-confirm-message {
        font-size: 14px;
        margin-bottom: 20px;
    }
    
    .alert-confirm-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .alert-confirm-cancel,
    .alert-confirm-ok {
        width: 100%;
        padding: 12px;
    }
}

/* Prompt Dialog Styles */
.alert-prompt-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.alert-prompt-modal.show {
    opacity: 1;
    visibility: visible;
}

.alert-prompt-modal.hide {
    opacity: 0;
    visibility: hidden;
}

.alert-prompt-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.alert-prompt-content {
    background: white;
    border-radius: 12px;
    padding: 24px;
    max-width: 420px;
    width: 90%;
    position: relative;
    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: all 0.3s ease;
}

.alert-prompt-modal.show .alert-prompt-content {
    transform: scale(1);
}

.alert-prompt-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.alert-prompt-icon {
    width: 48px;
    height: 48px;
    background: #0095FF;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
}

.alert-prompt-header h3 {
    margin: 0;
    color: #1f2937;
    font-size: 18px;
    font-weight: 600;
}

.alert-prompt-message {
    color: #4b5563;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 20px;
}

.alert-prompt-input {
    margin-bottom: 24px;
}

.alert-prompt-input input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    color: #1f2937;
    transition: all 0.2s ease;
}

.alert-prompt-input input:focus {
    outline: none;
    border-color: #0095FF;
    box-shadow: 0 0 0 3px rgba(0, 149, 255, 0.1);
}

.alert-prompt-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.alert-prompt-cancel,
.alert-prompt-ok {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.alert-prompt-cancel {
    background: #f3f4f6;
    color: #374151;
}

.alert-prompt-cancel:hover {
    background: #e5e7eb;
}

.alert-prompt-ok {
    background: #0095FF;
    color: white;
}

.alert-prompt-ok:hover {
    background: #0077cc;
    transform: translateY(-1px);
}

/* Responsive design for prompt dialog */
@media (max-width: 768px) {
    .alert-prompt-content {
        padding: 20px 16px;
        margin: 16px;
        max-width: 340px;
    }
    
    .alert-prompt-header {
        margin-bottom: 12px;
    }
    
    .alert-prompt-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .alert-prompt-header h3 {
        font-size: 16px;
    }
    
    .alert-prompt-message {
        font-size: 13px;
        margin-bottom: 16px;
    }
    
    .alert-prompt-input {
        margin-bottom: 20px;
    }
    
    .alert-prompt-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .alert-prompt-cancel,
    .alert-prompt-ok {
        width: 100%;
        padding: 12px;
    }
}
