/* Alerts Page - Modern Colorful Design */
/* Following UI Style Guide principles */

/* ===== Page Header ===== */
#page-alerts .page-header {
    margin-bottom: 24px;
}

#page-alerts .page-title {
    background: linear-gradient(135deg, #ef4444 0%, #f59e0b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

#page-alerts .header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

#page-alerts .checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    cursor: pointer;
}

#page-alerts .checkbox-label input {
    accent-color: #ef4444;
}

/* ===== Alerts List ===== */
#page-alerts .alerts-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ===== Alert Item ===== */
.alert-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 18px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.alert-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--alert-color, var(--border-color));
}

.alert-item:hover {
    border-color: var(--alert-color, var(--text-muted));
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    transform: translateX(4px);
}

/* Severity-based colors */
.alert-item.critical {
    --alert-color: #ef4444;
}

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

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

.alert-item.success {
    --alert-color: #22c55e;
}

/* Alert Icon */
.alert-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    background: linear-gradient(135deg, var(--alert-color, #3b82f6)20, var(--alert-color, #3b82f6)10);
    border: 1px solid var(--alert-color, #3b82f6)30;
    box-shadow: 0 0 16px var(--alert-color, #3b82f6)20;
    flex-shrink: 0;
}

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

.alert-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.alert-message {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
    line-height: 1.5;
}

.alert-item .activity-time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Alert Actions */
.alert-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.alert-actions .btn-sm {
    padding: 6px 14px;
    background: transparent;
    border: 1px solid var(--alert-color, var(--border-color));
    color: var(--alert-color, var(--text-secondary));
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.alert-actions .btn-sm:hover {
    background: var(--alert-color, #3b82f6);
    color: white;
}

.alert-actions .status-badge.healthy {
    background: #22c55e20;
    color: #22c55e;
    border: 1px solid #22c55e30;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
}

/* ===== Animation ===== */
.alert-item {
    animation: alertSlideIn 0.3s ease forwards;
    opacity: 0;
}

@keyframes alertSlideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.alert-item:nth-child(1) { animation-delay: 0ms; }
.alert-item:nth-child(2) { animation-delay: 50ms; }
.alert-item:nth-child(3) { animation-delay: 100ms; }
.alert-item:nth-child(4) { animation-delay: 150ms; }
.alert-item:nth-child(5) { animation-delay: 200ms; }

/* ===== Empty State ===== */
#page-alerts .empty-state {
    padding: 60px 20px;
    text-align: center;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .alert-item {
        flex-direction: column;
    }

    .alert-actions {
        width: 100%;
        justify-content: flex-end;
    }
}
