/* Global Alert System */
.alert-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 400px;
}

.custom-alert {
    background: white;
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    gap: 1rem;
    animation: slideInRight 0.4s ease;
    border-left: 4px solid #10b981;
    position: relative;
    overflow: hidden;
}

.custom-alert::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    animation: progressBar 5s linear;
    width: 100%;
}

.custom-alert.alert-success {
    border-left-color: #10b981;
}

.custom-alert.alert-success .alert-icon {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.custom-alert.alert-error {
    border-left-color: #ef4444;
}

.custom-alert.alert-error .alert-icon {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.custom-alert.alert-error::before {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.custom-alert.alert-warning {
    border-left-color: #f59e0b;
}

.custom-alert.alert-warning .alert-icon {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.custom-alert.alert-warning::before {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.custom-alert.alert-info {
    border-left-color: var(--primary-color);
}

.custom-alert.alert-info .alert-icon {
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
}

.alert-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.alert-icon i {
    color: white;
    font-size: 1.2rem;
}

.alert-content {
    flex: 1;
}

.alert-title {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.25rem;
    font-size: 1rem;
}

.alert-message {
    color: var(--text-color);
    font-size: 0.9rem;
    margin: 0;
}

.alert-close {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.alert-close:hover {
    color: var(--dark-color);
    transform: rotate(90deg);
}

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

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

@keyframes progressBar {
    from {
        width: 100%;
    }
    to {
        width: 0%;
    }
}

.custom-alert.alert-hiding {
    animation: slideOutRight 0.4s ease forwards;
}

/* Mobile Responsive */
@media (max-width: 576px) {
    .alert-container {
        left: 10px;
        right: 10px;
        top: 10px;
        max-width: none;
    }
    
    .custom-alert {
        padding: 1rem;
    }
    
    .alert-icon {
        width: 35px;
        height: 35px;
    }
    
    .alert-icon i {
        font-size: 1rem;
    }
    
    .alert-title {
        font-size: 0.95rem;
    }
    
    .alert-message {
        font-size: 0.85rem;
    }
}

/* Confirm Dialog */
.confirm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.confirm-overlay.active {
    display: flex;
}

.confirm-dialog {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: slideInUp 0.3s ease;
}

.confirm-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.confirm-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.confirm-icon i {
    color: white;
    font-size: 1.5rem;
}

.confirm-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--dark-color);
    margin: 0;
}

.confirm-message {
    color: var(--text-color);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.confirm-buttons {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.confirm-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.confirm-btn-cancel {
    background: #e2e8f0;
    color: var(--dark-color);
}

.confirm-btn-cancel:hover {
    background: #cbd5e1;
}

.confirm-btn-confirm {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.confirm-btn-confirm:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(239, 68, 68, 0.3);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}
