/* Overall status banner */
.overall-status {
    background: var(--surface-1);
    border: 1px solid var(--border-color-dark);
    border-radius: 0.75rem;
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.overall-status-inner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.overall-status.all-operational {
    border-color: rgba(34, 197, 94, 0.25);
    background: rgba(34, 197, 94, 0.05);
}

.overall-status.has-issues {
    border-color: rgba(245, 158, 11, 0.25);
    background: rgba(245, 158, 11, 0.05);
}

.overall-status.major-outage {
    border-color: rgba(239, 68, 68, 0.25);
    background: rgba(239, 68, 68, 0.05);
}

/* Status dots */
.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-dot-lg {
    width: 14px;
    height: 14px;
}

.status-dot.operational {
    background: #22c55e;
    box-shadow: 0 0 6px rgba(34, 197, 94, 0.4);
}

.status-dot.degraded {
    background: #f59e0b;
    box-shadow: 0 0 6px rgba(245, 158, 11, 0.4);
}

.status-dot.outage {
    background: #ef4444;
    box-shadow: 0 0 6px rgba(239, 68, 68, 0.4);
    animation: pulse-red 2s ease-in-out infinite;
}

.status-dot.maintenance {
    background: #6366f1;
    box-shadow: 0 0 6px rgba(99, 102, 241, 0.4);
}

.status-dot.unknown {
    background: #6b7280;
}

@keyframes pulse-red {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Service groups */
.service-group {
    background: var(--surface-1);
    border: 1px solid var(--border-color-dark);
    border-radius: 0.75rem;
    padding: 1.25rem 1.5rem;
}

.group-title {
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.service-list {
    display: flex;
    flex-direction: column;
}

.service-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem 0;
    border-bottom: 1px solid var(--border-color-dark);
    gap: 1rem;
}

.service-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.service-row:first-child {
    padding-top: 0;
}

.service-info {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    min-width: 0;
}

.service-icon {
    font-size: 1.25rem;
    color: var(--text-muted);
    flex-shrink: 0;
    width: 1.5rem;
    text-align: center;
}

.service-name {
    display: block;
    font-weight: 600;
    font-size: 0.938rem;
    color: var(--text-primary);
}

.service-desc {
    display: block;
    font-size: 0.813rem;
    color: var(--text-muted);
    margin-top: 0.125rem;
}

.service-status {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    flex-shrink: 0;
}

.status-label {
    font-size: 0.813rem;
    font-weight: 500;
    color: var(--text-muted);
    white-space: nowrap;
}

.status-label.operational { color: #22c55e; }
.status-label.degraded { color: #f59e0b; }
.status-label.outage { color: #ef4444; }
.status-label.maintenance { color: #6366f1; }

/* Uptime bars */
.uptime-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.uptime-row {
    display: grid;
    grid-template-columns: 140px 1fr 60px;
    align-items: center;
    gap: 1rem;
}

.uptime-service-name {
    font-size: 0.813rem;
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.uptime-bars {
    display: flex;
    gap: 1.5px;
    height: 28px;
    align-items: stretch;
}

.uptime-bar {
    flex: 1;
    border-radius: 2px;
    min-width: 2px;
    transition: opacity 0.15s;
    cursor: default;
    position: relative;
}

.uptime-bar:hover {
    opacity: 0.8;
}

.uptime-bar.up { background: #22c55e; }
.uptime-bar.degraded { background: #f59e0b; }
.uptime-bar.down { background: #ef4444; }
.uptime-bar.no-data { background: var(--border-color-dark); }

.uptime-bar[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 0.688rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    white-space: nowrap;
    z-index: 10;
    pointer-events: none;
}

.uptime-percent {
    font-size: 0.813rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.uptime-legend {
    display: flex;
    justify-content: space-between;
    padding-left: calc(140px + 1rem);
    padding-right: calc(60px + 1rem);
}

/* Incidents */
.incidents-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.incident-card {
    background: var(--surface-1);
    border: 1px solid var(--border-color-dark);
    border-radius: 0.75rem;
    padding: 1.25rem 1.5rem;
}

.incident-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.incident-title {
    font-weight: 600;
    font-size: 0.938rem;
    color: var(--text-primary);
}

.incident-date {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
    flex-shrink: 0;
}

.incident-badge {
    display: inline-block;
    font-size: 0.688rem;
    font-weight: 600;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.incident-badge.resolved {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.incident-badge.investigating {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.incident-badge.identified {
    background: rgba(99, 102, 241, 0.15);
    color: #6366f1;
}

.incident-updates {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color-dark);
}

.incident-update {
    display: flex;
    gap: 0.75rem;
    padding: 0.375rem 0;
    font-size: 0.813rem;
}

.incident-update-time {
    color: var(--text-muted);
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
    min-width: 2.5rem;
}

.incident-update-text {
    color: var(--text-secondary);
    line-height: 1.5;
}

.no-incidents {
    background: var(--surface-1);
    border: 1px solid var(--border-color-dark);
    border-radius: 0.75rem;
}

/* Subscribe section */
.subscribe-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.subscribe-row input[type="email"] {
    flex: 1;
    min-width: 200px;
    padding: 0.5rem 0.75rem;
    background: var(--surface-2);
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.subscribe-row input[type="email"]:focus {
    outline: none;
    border-color: var(--primary-5);
}

/* Responsive */
@media (max-width: 768px) {
    .uptime-row {
        grid-template-columns: 100px 1fr 50px;
        gap: 0.5rem;
    }

    .uptime-legend {
        padding-left: calc(100px + 0.5rem);
        padding-right: calc(50px + 0.5rem);
    }

    .service-desc {
        display: none;
    }

    .overall-status {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .uptime-row {
        grid-template-columns: 80px 1fr 45px;
    }

    .uptime-legend {
        padding-left: calc(80px + 0.5rem);
        padding-right: calc(45px + 0.5rem);
    }
}
