/* Status Page Custom Styles */

/* Status Colors */
.status-operational, .bg-status-operational {
    background-color: #28a745 !important;
    color: white;
}

.status-degraded, .bg-status-degraded {
    background-color: #ffc107 !important;
    color: #212529;
}

.status-partial_outage, .bg-status-partial_outage, .bg-orange {
    background-color: #fd7e14 !important;
    color: white;
}

.status-major_outage, .bg-status-major_outage {
    background-color: #dc3545 !important;
    color: white;
}

.status-maintenance, .bg-status-maintenance {
    background-color: #17a2b8 !important;
    color: white;
}

.text-orange {
    color: #fd7e14 !important;
}

.badge.bg-orange {
    background-color: #fd7e14 !important;
}

/* Overall Status Banner */
.status-banner {
    padding: 2rem;
    border-radius: 0.5rem;
    text-align: center;
    margin-bottom: 2rem;
}

.status-banner h2 {
    margin-bottom: 0;
    font-weight: 500;
}

.status-banner.operational {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.status-banner.degraded {
    background-color: #fff3cd;
    border: 1px solid #ffeeba;
    color: #856404;
}

.status-banner.partial_outage {
    background-color: #ffe5d0;
    border: 1px solid #ffd8b8;
    color: #8a4500;
}

.status-banner.major_outage {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.status-banner.maintenance {
    background-color: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

/* Service List */
.service-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e9ecef;
}

.service-item:last-child {
    border-bottom: none;
}

.service-name {
    font-weight: 500;
}

.service-description {
    font-size: 0.875rem;
    color: #6c757d;
}

.service-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.status-dot.operational { background-color: #28a745; }
.status-dot.degraded { background-color: #ffc107; }
.status-dot.partial_outage { background-color: #fd7e14; }
.status-dot.major_outage { background-color: #dc3545; }
.status-dot.maintenance { background-color: #17a2b8; }

/* Incident Timeline */
.incident-timeline {
    position: relative;
    padding-left: 2rem;
}

.incident-timeline::before {
    content: '';
    position: absolute;
    left: 0.5rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: #dee2e6;
}

.timeline-item {
    position: relative;
    padding-bottom: 1.5rem;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -1.75rem;
    top: 0.25rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #6c757d;
    border: 2px solid white;
}

.timeline-dot.investigating { background-color: #dc3545; }
.timeline-dot.identified { background-color: #ffc107; }
.timeline-dot.monitoring { background-color: #17a2b8; }
.timeline-dot.resolved { background-color: #28a745; }

.timeline-time {
    font-size: 0.75rem;
    color: #6c757d;
    margin-bottom: 0.25rem;
}

.timeline-status {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.timeline-message {
    color: #495057;
}

/* Maintenance Card */
.maintenance-card {
    border-left: 4px solid #17a2b8;
}

/* Maintenance Timeline (mirrors incident timeline) */
.maintenance-timeline {
    position: relative;
    padding-left: 2rem;
}

.maintenance-timeline::before {
    content: '';
    position: absolute;
    left: 0.5rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: #dee2e6;
}

.timeline-dot.maintenance-scheduled { background-color: #17a2b8; }
.timeline-dot.maintenance-in_progress { background-color: #ffc107; }
.timeline-dot.maintenance-completed { background-color: #28a745; }

/* Admin Dashboard Stats */
.stat-card {
    text-align: center;
    padding: 1.5rem;
}

.stat-card .stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
}

.stat-card .stat-label {
    color: #6c757d;
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

/* Sortable Services */
.sortable-item {
    cursor: move;
}

.sortable-item.dragging {
    opacity: 0.5;
}

/* Form improvements */
.form-label.required::after {
    content: ' *';
    color: #dc3545;
}

/* Responsive table */
@media (max-width: 768px) {
    .table-responsive-stack tr {
        display: flex;
        flex-direction: column;
        border-bottom: 2px solid #dee2e6;
        padding: 1rem 0;
    }

    .table-responsive-stack td {
        border: none;
        padding: 0.25rem 0;
    }

    .table-responsive-stack td::before {
        content: attr(data-label);
        font-weight: bold;
        display: inline-block;
        width: 120px;
    }
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #6c757d;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* Severity badges */
.severity-high { color: #dc3545; }
.severity-medium { color: #ffc107; }
.severity-low { color: #17a2b8; }

/* Timezone switcher */
.timezone-switcher-wrap {
    gap: 0.5rem;
    margin-right: 0.75rem;
}

.timezone-label {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.8rem;
    white-space: nowrap;
}

.timezone-switcher {
    min-width: 220px;
}

@media (max-width: 991.98px) {
    .timezone-switcher-wrap {
        margin: 0.5rem 0;
        width: 100%;
    }

    .timezone-switcher {
        min-width: 100%;
    }
}
