/**
 * Alert Component CSS
 */

.alert {
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.alert-success {
    background: #f0fff4;
    color: #22543d;
    border-color: #68d391;
}

.alert-error {
    background: #fed7d7;
    color: #742a2a;
    border-color: #fc8181;
}

.alert-warning {
    background: #fffbeb;
    color: #744210;
    border-color: #f6ad55;
}

.alert-info {
    background: #ebf8ff;
    color: #2a4365;
    border-color: #63b3ed;
}

/* Alert Icons */
.alert-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.alert-success .alert-icon {
    color: #38a169;
}

.alert-error .alert-icon {
    color: #e53e3e;
}

.alert-warning .alert-icon {
    color: #dd6b20;
}

.alert-info .alert-icon {
    color: #3182ce;
}

/* Alert Content */
.alert-content {
    flex: 1;
}

.alert-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.alert-message {
    margin: 0;
}

/* Dismissible Alerts */
.alert-dismissible {
    padding-right: 3rem;
}

.alert-close {
    position: absolute;
    top: 50%;
    right: 1rem;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: inherit;
    opacity: 0.7;
    padding: 0;
    line-height: 1;
}

.alert-close:hover {
    opacity: 1;
}

/* Toast Alerts */
.toast-container {
    position: fixed;
    top: 100px;
    right: 20px;
    z-index: 10000;
    max-width: 400px;
}

.toast {
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    margin-bottom: 1rem;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s ease;
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

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

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

.alert-slide-in {
    animation: slideInRight 0.3s ease-out;
}

.alert-slide-out {
    animation: slideOutRight 0.3s ease-out;
}

/* Responsive Alerts */
@media (max-width: 768px) {
    .toast-container {
        top: 80px;
        left: 10px;
        right: 10px;
        max-width: none;
    }
    
    .alert {
        padding: 0.75rem 1rem;
    }
    
    .alert-dismissible {
        padding-right: 2.5rem;
    }
    
    .alert-close {
        right: 0.75rem;
    }
}