.view-badge {
    font-size: 0.7rem;
    color: #4a90e2;
    text-decoration: none;
    font-weight: 500;
    background-color: #e8f1fc;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.view-badge:hover {
    background-color: #4a90e2;
    color: white;
    text-decoration: none;
}

.view-link,
.view-link:hover {
    display: none;
}

.status-indicator, .maintenance-indicator {
    background: white;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 20px;
    padding: 0.3rem 0.8rem;  /* Reduzierte Padding */
    display: inline-flex;
    align-items: center;
    gap: 8px; /* Verwende gap statt margin für konsistente Abstände */
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.05);
    font-size: 0.85rem;     /* Kleinere Schrift */
}

.color-dot, .maintenance-dot {
    flex-shrink: 0; /* Verhindert Verzerrung */
    width: 8px;             /* Kleinerer Punkt */
    height: 8px;            /* Kleinerer Punkt */
    border-radius: 50%;
    margin-right: 8px;
    position: relative;
    display: inline-block; /* Wichtig für konsistente Form */
}

.color-dot::after, .maintenance-dot::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: inherit;
    opacity: 0.6;
    transform-origin: center center;
    animation: pulse-centered 1.5s infinite;
    pointer-events: none;
}

/* Status colors mit verbesserten Farben */
.color-dot.none { background-color: #00c853; }
.color-dot.maintenance { background-color: #0078D4; }
.color-dot.minor { background-color: #ffd600; }
.color-dot.major { background-color: #ff6d00; }
.color-dot.critical { background-color: #d50000; }

/* Semantic Badge System */
.badge-date {
    background-color: var(--color-primary) !important;
    color: #fff;
}
.badge-group {
    background-color: var(--color-danger) !important;
    color: #fff;
}
.status-badge--resolved { background-color: var(--color-success) !important; color:#fff; }
.status-badge--minor { background-color: var(--color-warning) !important; color:#333; }
.status-badge--major { background-color: var(--color-major) !important; color:#fff; }
.status-badge--critical { background-color: var(--color-critical) !important; color:#fff; }
.status-badge--maintenance { background-color: var(--color-accent) !important; color:#fff; }

/* Keyframes for blinking animation */
@keyframes blink-animation {
    0% { opacity: 1; }
    50% { opacity: 0.2; }
    100% { opacity: 1; }
}

.maintenance-dot {
    background-color: #0078D4;  /* Azure Blau */
}

.color-description, .maintenance-count {
    font-size: 0.85rem;     /* Kleinere Schrift */
    color: #455a64;
}

.status-card .btn-sm {
    border-radius: 20px;
    font-size: 0.8rem;
    padding: 0.3rem 1rem;
    font-weight: 500;
    border: none;
    background: #4a90e2;
    color: white;
    transition: all 0.2s ease;
}

.status-card .btn-sm:hover {
    background: #357abd;
}

@keyframes pulse-centered {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.6;
    }
    50% {
        transform: translate(-50%, -50%) scale(2);
        opacity: 0.2;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.6;
    }
}

.maintenance-info {
    background: #f8f9fa;
    padding: 0.5rem;
    border-radius: 6px;
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

.maintenance-info h4 {
    font-size: 1rem;
    margin-bottom: 0.3rem;
}

.status-components {
    display: none; /* Hide components to save space */
}

.btn-sm {
    padding: 0.2rem 0.5rem;
    font-size: 0.875rem;
    margin-top: 0.3rem;
}

#components-list {
    margin-top: 0.3rem;
    font-size: 0.9rem;
}

.component-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.3rem 0;
    border-bottom: 1px solid #eee;
}

.component-item:last-child {
    border-bottom: none;
}

.maintenance-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    color: white;
    background-color: #ff6d00; /* Default color, will be overridden by specific status */
    border-radius: 10px;
    margin-left: 8px;
    vertical-align: middle;
}

/* Styles for small screens to hide text in status badges and make investigation blink */
/* MODIFIED for incident status badges to become color dots with pulse */
@media (max-width: 768px) {
    /* Comment out old rules that are replaced by .incident-status-badge rules below */
    /*
    .badge.bg-warning.text-uppercase .status-text,
    .badge.bg-success.text-uppercase .status-text {
        display: none; 
    }

    .badge.bg-warning.text-uppercase,
    .badge.bg-success.text-uppercase {
        display: inline-block; 
        width: 10px;          
        height: 10px;         
        padding: 0;           
        font-size: 0;         
        line-height: 10px;    
        text-indent: -9999px; 
        overflow: hidden;     
        vertical-align: middle;
        box-sizing: border-box;
    }

    .badge.bg-warning.text-uppercase {
        animation: blink-animation 1s infinite;
    }
    */

    /* New styles for .incident-status-badge on small screens */
    .incident-status-badge {
        display: inline-block; /* Ensure it's displayed as a block to take width/height */
        width: 10px;
        height: 10px;
        padding: 0; /* Remove padding if it's just a dot */
        border-radius: 50%;
        vertical-align: middle;
        position: relative; /* For pulse animation positioning */
        flex-shrink: 0; /* Prevent shrinking in flex container */
        /* Background color will be set by data-status-indicator attribute */
    }

    /* Set background color for the dot based on data attribute */
    /* These override Bootstrap's bg-warning, bg-success etc. on small screens for these specific badges */
    .incident-status-badge[data-status-indicator="none"] { background-color: #00c853 !important; }
    .incident-status-badge[data-status-indicator="maintenance"] { background-color: #0078D4 !important; } /* For consistency if ever used */
    .incident-status-badge[data-status-indicator="minor"] { background-color: #ffd600 !important; }
    .incident-status-badge[data-status-indicator="major"] { background-color: #ff6d00 !important; }
    .incident-status-badge[data-status-indicator="critical"] { background-color: #d50000 !important; }

    /* Pulse animation using ::after, reuses existing @keyframes pulse */
    .incident-status-badge::after {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 100%;
        height: 100%;
        border-radius: 50%;
        background: inherit;
        opacity: 0.6;
        transform: translate(-50%, -50%);
        transform-origin: center center;
        animation: pulse-centered 1.5s infinite;
        pointer-events: none;
    }
}