@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600;700&display=swap');

body {
    font-family: 'Open Sans', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f6f9;
    color: #333;
}

/* Header */
.header-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    background-color: #005eb8;
    color: white;
    padding: 10px 20px;
}

.header-title img.logo {
    height: 40px;
}

.header-title h1 {
    margin: 0;
    font-size: 1.5rem;
    color: white;
    text-align: center;
    flex: 1;
}

/* Epiphan video text styling */
.header-logo-link span {
    color: #4a90e2 !important;
    font-weight: 300;
    font-size: 1.2rem;
    white-space: nowrap;
}

.header-logo-link:hover span {
    color: #3a7bc8 !important;
}

#controls {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
}

#refresh-button {
    padding: 6px 14px;
    background-color: #1b72d0;
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
}

#refresh-button:hover {
    background-color: #155aab;
}

#back-button {
    padding: 6px 14px;
    background-color: #6c757d;
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
}

#back-button:hover {
    background-color: #5a6268;
}

/* Banner */
.status-banner {
    padding: 12px;
    margin: 20px auto;
    border-radius: 6px;
    max-width: 700px;
    font-weight: bold;
    text-align: center;
}

.status-banner.operational {
    background-color: #d3f0d3;
    color: #2e7d32;
}

.status-banner.maintenance {
    background-color: #fff9e6;
    color: #856404;
}

.status-banner.degraded {
    background-color: #ffe8cc;
    color: #d84315;
}

.status-banner.warning {
    background-color: #fff9e6;
    color: #856404;
}

.status-banner.unknown {
    background-color: #e0e0e0;
    color: #616161;
}

/* Container */
.container {
    max-width: 1200px;
    margin: auto;
    padding: 20px;
}

/* Environment Grid */
.env-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    justify-items: center;
}

/* Environment Card */
.env-card {
    width: 260px;
    border-radius: 10px;
    padding: 16px 20px;
    font-size: 0.95rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
    border-left: 8px solid transparent;
    transition: 0.3s ease;
}

.env-card.healthy {
    background-color: #e6f4ea !important;
    border-left-color: #2e7d32 !important;
    color: #1b5e20 !important;
}

.env-card.warning {
    background-color: #fff3e0 !important;
    border-left-color: #f57c00 !important;
    color: #e65100 !important;
}

.env-card.maintenance {
    background-color: #fff9e6 !important;
    border-left-color: #ffa726 !important;
    color: #ef6c00 !important;
}

.env-card.issue {
    background-color: #fdecea !important;
    border-left-color: #c62828 !important;
    color: #b71c1c !important;
}

.env-card.unknown {
    background-color: #f5f5f5 !important;
    border-left-color: #9e9e9e !important;
    color: #555 !important;
}

.env-card h2 {
    margin: 0 0 10px 0;
    color: #005eb8;
    font-size: 1.1rem;
}

.env-card p {
    margin: 6px 0;
}

/* Service Cards */
.service {
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.status-icon {
    font-size: 1.2rem;
}

/* History */
.history-event {
    padding: 8px 0;
    border-bottom: 1px solid #ddd;
}

/* Footer */
footer {
    text-align: center;
    background-color: #f1f1f1;
    padding: 12px;
    font-size: 0.9rem;
    color: #666;
}

h2 {
    color: #005eb8;
    font-weight: 600;
}

h3 {
    margin-top: 20px;
    font-size: 1.1rem;
    color: #444;
    border-bottom: 1px solid #ddd;
    padding-bottom: 4px;
}

/* Shared status styles */
.status-tile {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 8px;
    border-left: 6px solid transparent;
    font-size: 0.95rem;
    white-space: nowrap;
    margin: 5px;
    transition: 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Match env styles */
.status-tile.healthy {
    background-color: #e6f4ea !important;
    border-left-color: #2e7d32;
    color: #1b5e20;
}

.status-tile.issue {
    background-color: #fdecea !important;
    border-left-color: #c62828;
    color: #b71c1c;
}

.status-tile.warning {
    background-color: #fff3e0 !important;
    border-left-color: #f57c00;
    color: #e65100;
}

.status-tile.unhealthy {
    background-color: #ffebee !important;
    border-left-color: #d32f2f;
    color: #c62828;
}

.status-tile.maintenance {
    background-color: #fff9c4 !important;
    border-left-color: #fbc02d;
    color: #f57f17;
}

.status-tile.unknown {
    background-color: #eeeeee !important;
    border-left-color: #9e9e9e;
    color: #616161;
}


/*Public Status styles */
.public-status-title {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 8px;
    border-left: 6px solid transparent;
    font-size: 0.95rem;
    white-space: nowrap;
    margin: 5px;
    transition: 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Match env styles */
.public-title.healthy,
.public-status-title.healthy {
    background-color: #e6f4ea !important;
    border-left-color: #2e7d32;
    color: #1b5e20;
}

.public-status-title.issue {
    background-color: #fff4e5 !important;
    border-left-color: #f9a825;
    color: #f9a825;
}

.public-status-title.warning {
    background-color: #fff9e6 !important;
    border-left-color: #fb8c00;
    color: #e65100;
}

.public-status-title.maintenance {
    background-color: #fff8e1 !important;
    border-left-color: #f9a825;
    color: #f9a825;
}

.public-status-title.unknown {
    background-color: #eeeeee !important;
    border-left-color: #9e9e9e;
    color: #616161;
}

/* Region group */
.region-block {
    margin-top: 25px;
    width: 100%;
}

.region-block h3 {
    margin: 10px 0 6px 6px;
    color: #1a237e;
    font-size: 1rem;
    font-weight: 600;
}

.tile-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.env-card .log-breakdown {
    margin-top: 8px;
    font-size: 0.85rem;
}

.env-card .log-breakdown ul {
    list-style: none;
    padding-left: 0;
    margin: 4px 0 0 0;
}

.env-card .log-breakdown li {
    margin: 2px 0;
}

#history-container {
    margin-top: 1rem;
    font-size: 0.9rem;
}

#history-container summary {
    cursor: pointer;
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.history-event {
    padding-left: 1rem;
    margin-bottom: 0.25rem;
}

/* External Services Group */
.service-group-card {
    margin-bottom: 20px;
    padding: 12px 16px;
    border-left: 6px solid transparent;
    border-radius: 10px;
    background-color: #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.service-group-card.healthy {
    border-left-color: #2e7d32;
}

.service-group-card.issue {
    border-left-color: #c62828;
}

.service-group-card.maintenance {
    border-left-color: #f9a825;
}

.service-group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.expand-btn {
    background: none;
    border: none;
    color: #1b72d0;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0;
}

.expand-btn:hover {
    text-decoration: underline;
}

.collapsed {
    display: none;
}

/* Total Logs Card */
#log-summary-placeholder {
    width: 100%;
    margin: 0 auto 20px auto;
    display: flex;
    justify-content: center;
}

.log-summary-card {
    width: 150%;
    max-width: 1300px;
    background-color: #e6f4ea;
    padding: 12px 24px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 12px;
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.log-summary-card h3 {
    margin-top: 0;
    font-size: 1.4rem;
    font-weight: 600;
    color: #1a237e;
    margin-bottom: 4px;
}

.log-summary-card .log-levels {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: center;
    gap: 1px;
    font-size: 1.1rem;
    align-items: center;
    width: 100%;
    overflow-x: auto;
}

.log-summary-card .log-levels div {
    background-color: #f4f6f9;
    padding: 12px 18px;
    border-radius: 8px;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    white-space: nowrap;
}

/* Slack Subscribe Button */
.slack-subscribe-btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #4A154B;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 1rem;
    transition: background-color 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.slack-subscribe-btn:hover {
    background-color: #3D0F3A;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}