/* GitHub Status Page Inspired Styles */

:root {
    --status-operational: #2ea44f;
    --status-degraded: #bf8700;
    --status-partial: #d73a49;
    --status-major: #cb2431;

    /* Light mode colors */
    --background: #ffffff;
    --surface: #f6f8fa;
    --surface-light: #ffffff;
    --border: #d0d7de;
    --text-primary: #24292f;
    --text-secondary: #57606a;
    --text-muted: #6e7781;
}

/* Dark mode colors */
@media (prefers-color-scheme: dark) {
    :root {
        --background: #0d1117;
        --surface: #161b22;
        --surface-light: #21262d;
        --border: #30363d;
        --text-primary: #c9d1d9;
        --text-secondary: #8b949e;
        --text-muted: #6e7681;
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Atkinson Hyperlegible Mono', monospace;
    background-color: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* Full-width banner */
.banner-container {
    width: 100%;
    height: 280px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--surface);
}

.banner-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Status Banner - Centered and Prominent */
.status-banner {
    text-align: center;
    padding: 48px 24px;
    margin-bottom: 48px;
}

.status-content {
    display: inline-flex;
    align-items: center;
    gap: 20px;
}

.status-text {
    text-align: left;
}

.status-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-icon.operational {
    background-color: var(--status-operational);
}

.status-icon.degraded-performance {
    background-color: var(--status-degraded);
}

.status-icon.partial-outage {
    background-color: var(--status-partial);
}

.status-icon.major-outage {
    background-color: var(--status-major);
}

/* Legacy class names for backwards compatibility */
.status-icon.degraded {
    background-color: var(--status-degraded);
}

.status-icon.partial {
    background-color: var(--status-partial);
}

.status-icon.major {
    background-color: var(--status-major);
}

.status-text h2 {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 8px;
}

.status-text p {
    color: var(--text-secondary);
    font-size: 16px;
}

/* Sections */
section {
    margin-bottom: 48px;
}

section h3 {
    font-size: 20px;
    margin-bottom: 20px;
    color: var(--text-primary);
}

/* Components List - 3 Column Grid */
.components-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}

.component-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s, border-color 0.2s;
}

.component-item:hover {
    background-color: var(--surface-light);
    border-color: var(--text-muted);
}

.component-info {
    flex: 0 1 auto;
}

.component-name {
    font-weight: 500;
    font-size: 16px;
    margin-bottom: 0;
}

.component-description {
    font-size: 13px;
    color: var(--text-secondary);
    display: none;
}

.component-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    flex-shrink: 0;
}

.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.status-indicator.operational {
    background-color: var(--status-operational);
}

.status-indicator.degraded-performance,
.status-indicator.degraded {
    background-color: var(--status-degraded);
}

.status-indicator.partial-outage,
.status-indicator.partial {
    background-color: var(--status-partial);
}

.status-indicator.major-outage,
.status-indicator.major {
    background-color: var(--status-major);
}

.status-label.operational {
    color: var(--status-operational);
}

.status-label.degraded-performance,
.status-label.degraded {
    color: var(--status-degraded);
}

.status-label.partial-outage,
.status-label.partial {
    color: var(--status-partial);
}

.status-label.major-outage,
.status-label.major {
    color: var(--status-major);
}

/* Incidents Toggle */
.incidents-toggle {
    cursor: pointer;
    padding: 12px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    user-select: none;
}

.incidents-toggle-text {
    font-size: 14px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.incidents-toggle-icon {
    font-size: 12px;
    color: var(--text-muted);
    transition: transform 0.2s;
}

.incidents-toggle.expanded .incidents-toggle-icon {
    transform: rotate(-180deg);
}

.incidents-toggle:hover .incidents-toggle-text {
    color: var(--text-primary);
}

.incidents-content {
    margin-top: 16px;
}

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

.incident-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
}

.incident-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 12px;
    gap: 16px;
}

.incident-title {
    font-size: 18px;
    font-weight: 600;
    flex: 1;
}

.incident-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    white-space: nowrap;
}

.incident-status.resolved {
    background-color: rgba(46, 164, 79, 0.15);
    color: var(--status-operational);
}

.incident-status.monitoring {
    background-color: rgba(191, 135, 0, 0.15);
    color: var(--status-degraded);
}

.incident-status.investigating {
    background-color: rgba(215, 58, 73, 0.15);
    color: var(--status-partial);
}

.incident-date {
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 8px;
}

.incident-description {
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.6;
}

.incident-updates {
    border-top: 1px solid var(--border);
    padding-top: 16px;
}

.incident-update {
    margin-bottom: 12px;
    padding-left: 16px;
    border-left: 2px solid var(--border);
}

.incident-update:last-child {
    margin-bottom: 0;
}

.update-time {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.update-message {
    font-size: 14px;
    color: var(--text-secondary);
}

.no-incidents {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    color: var(--text-secondary);
}

/* Footer */
footer {
    text-align: center;
    padding: 40px 20px;
    border-top: 1px solid var(--border);
    margin-top: 60px;
    color: var(--text-muted);
    font-size: 14px;
}

.footer-note {
    margin-top: 8px;
    font-style: italic;
}

/* Responsive Design */
@media (max-width: 768px) {
    .banner-container {
        height: 200px;
    }

    .status-content {
        flex-direction: column;
        gap: 16px;
    }

    .status-text {
        text-align: center;
    }

    .status-text h2 {
        font-size: 24px;
    }

    .components-list {
        grid-template-columns: 1fr;
    }

    .component-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .incident-header {
        flex-direction: column;
    }

    .incident-status {
        align-self: flex-start;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .components-list {
        grid-template-columns: repeat(2, 1fr);
    }
}
