/* Alert Component Styles */

/* Alert Container (Inline) */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid;
    margin-bottom: 16px;
    position: relative;
    animation: slideIn 0.3s ease-out;
}

.alert.dismissing {
    animation: slideOut 0.3s ease-out forwards;
}

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

/* Alert Content */
.alert-content {
    flex: 1;
    font-size: 14px;
    line-height: 1.5;
}

.alert-title {
    font-weight: 600;
    margin-bottom: 4px;
}

.alert-message {
    font-weight: 400;
}

/* Alert Close Button */
.alert-close {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.6;
    transition: opacity 0.2s;
}

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

/* Alert Variants */

/* Success Alert */
.alert-success {
    background-color: #d1fae5;
    border-color: #6ee7b7;
    color: #065f46;
}

.alert-success .alert-icon {
    color: #10b981;
}

/* Error Alert */
.alert-error {
    background-color: #fee2e2;
    border-color: #fca5a5;
    color: #991b1b;
}

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

/* Warning Alert */
.alert-warning {
    background-color: #fef3c7;
    border-color: #fcd34d;
    color: #92400e;
}

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

/* Info Alert */
.alert-info {
    background-color: #dbeafe;
    border-color: #93c5fd;
    color: #1e40af;
}

.alert-info .alert-icon {
    color: #3b82f6;
}

/* SVG Icons */
.alert .icon-check,
.alert .icon-error,
.alert .icon-warning,
.alert .icon-info {
    width: 20px;
    height: 20px;
}

.alert .icon-close {
    width: 16px;
    height: 16px;
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideOut {
    from {
        opacity: 1;
        transform: translateY(0);
        max-height: 200px;
        margin-bottom: 16px;
    }
    to {
        opacity: 0;
        transform: translateY(-8px);
        max-height: 0;
        margin-bottom: 0;
        padding-top: 0;
        padding-bottom: 0;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .alert-success {
        background-color: rgba(16, 185, 129, 0.15);
        border-color: rgba(110, 231, 183, 0.3);
        color: #6ee7b7;
    }

    .alert-error {
        background-color: rgba(239, 68, 68, 0.15);
        border-color: rgba(252, 165, 165, 0.3);
        color: #fca5a5;
    }

    .alert-warning {
        background-color: rgba(245, 158, 11, 0.15);
        border-color: rgba(252, 211, 77, 0.3);
        color: #fcd34d;
    }

    .alert-info {
        background-color: rgba(59, 130, 246, 0.15);
        border-color: rgba(147, 197, 253, 0.3);
        color: #93c5fd;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .alert {
        padding: 12px;
        gap: 8px;
    }

    .alert-content {
        font-size: 13px;
    }
}
