/* Status Page CSS - Lord of Chains */
/* Matches the style of privacy.php */

:root {
    --primary-gold: #c9a856;
    --accent-gold: #ffcc00;
    --primary-red: #DC143C;
    --primary-blue: #1E90FF;
    --dark-bg: #0a0a0a;
    --darker-bg: #050505;
    --secondary-bg: #1a1a1a;
    --card-bg: #1f1f1f;
    --header-bg: #2a2a2a;
    --light-text: #e0e0e0;
    --secondary-text: #b8b8b8;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --border-color: #3a3a3a;
    --shadow: rgba(0, 0, 0, 0.7);
    
    /* Status colors */
    --status-operational: #2ecc71;
    --status-degraded: #f39c12;
    --status-down: #e74c3c;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', Arial, sans-serif;
    background: var(--dark-bg);
    color: var(--light-text);
    line-height: 1.6;
    min-height: 100vh;
}

/* Navigation styles are handled by shared-navigation.css */

/* Main Content */
.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 120px 20px 60px;
}

.page-header {
    text-align: center;
    margin-bottom: 40px;
}

.page-title {
    font-family: 'Cinzel', serif;
    font-size: 48px;
    font-weight: 700;
    background: linear-gradient(45deg, var(--primary-gold), var(--accent-gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 20px;
}

.last-updated {
    font-size: 14px;
    color: var(--secondary-text);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Status Banner */
.status-banner {
    background: var(--glass-bg);
    border: 2px solid var(--glass-border);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    gap: 30px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.status-banner.status-operational {
    border-color: var(--status-operational);
    background: rgba(46, 204, 113, 0.1);
}

.status-banner.status-degraded {
    border-color: var(--status-degraded);
    background: rgba(243, 156, 18, 0.1);
}

.status-banner.status-down {
    border-color: var(--status-down);
    background: rgba(231, 76, 60, 0.1);
}

.status-icon {
    font-size: 48px;
}

.status-operational .status-icon {
    color: var(--status-operational);
}

.status-degraded .status-icon {
    color: var(--status-degraded);
}

.status-down .status-icon {
    color: var(--status-down);
}

.status-text h2 {
    font-size: 28px;
    margin-bottom: 5px;
    font-weight: 600;
}

.status-text p {
    color: var(--secondary-text);
    font-size: 16px;
}

/* Quick Stats */
.quick-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(201, 168, 86, 0.1);
    border-color: rgba(201, 168, 86, 0.3);
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--accent-gold);
    margin-bottom: 10px;
}

.stat-label {
    font-size: 14px;
    color: var(--secondary-text);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-sublabel {
    font-size: 11px;
    color: var(--secondary-text);
    opacity: 0.7;
    margin-top: 2px;
}

/* Content Sections */
.content-section {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 30px;
    backdrop-filter: blur(10px);
}

.section-title {
    font-family: 'Cinzel', serif;
    font-size: 28px;
    color: var(--accent-gold);
    margin-bottom: 30px;
    font-weight: 600;
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.service-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
}

.service-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.service-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.service-name {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.status-dot.status-operational {
    background: var(--status-operational);
    box-shadow: 0 0 10px var(--status-operational);
}

.status-dot.status-degraded {
    background: var(--status-degraded);
    box-shadow: 0 0 10px var(--status-degraded);
}

.status-dot.status-down {
    background: var(--status-down);
    box-shadow: 0 0 10px var(--status-down);
}

.service-status {
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
}

.status-text-operational {
    color: var(--status-operational);
}

.status-text-degraded {
    color: var(--status-degraded);
}

.status-text-down {
    color: var(--status-down);
}

.service-details {
    color: var(--secondary-text);
    font-size: 14px;
}

.response-time {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 10px;
}

.response-time i {
    color: var(--accent-gold);
}

.uptime-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.uptime-label {
    min-width: 35px;
    font-size: 12px;
}

.uptime-bar {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.uptime-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--status-operational), var(--accent-gold));
    border-radius: 4px;
    transition: width 0.3s ease;
}

.uptime-value {
    min-width: 45px;
    text-align: right;
    font-size: 12px;
    font-weight: 600;
}

/* Incidents */
.no-incidents {
    text-align: center;
    padding: 40px;
    color: var(--secondary-text);
}

.no-incidents i {
    font-size: 48px;
    color: var(--status-operational);
    margin-bottom: 20px;
}

.incidents-timeline {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.incident-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 25px;
    border-left: 4px solid;
}

.incident-card:hover {
    background: rgba(255, 255, 255, 0.05);
}

.incident-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.incident-title {
    font-weight: 600;
    font-size: 18px;
}

.incident-severity {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    text-transform: uppercase;
    margin-right: 10px;
}

.severity-minor {
    background: rgba(46, 204, 113, 0.2);
    color: var(--status-operational);
}

.severity-major {
    background: rgba(243, 156, 18, 0.2);
    color: var(--status-degraded);
}

.severity-critical {
    background: rgba(231, 76, 60, 0.2);
    color: var(--status-down);
}

.incident-status {
    font-size: 14px;
    padding: 4px 12px;
    border-radius: 20px;
    text-transform: uppercase;
}

.status-investigating {
    background: rgba(231, 76, 60, 0.2);
    color: var(--status-down);
}

.status-identified {
    background: rgba(243, 156, 18, 0.2);
    color: var(--status-degraded);
}

.status-monitoring {
    background: rgba(52, 152, 219, 0.2);
    color: var(--primary-blue);
}

.status-resolved {
    background: rgba(46, 204, 113, 0.2);
    color: var(--status-operational);
}

.incident-time {
    color: var(--secondary-text);
    font-size: 14px;
    margin-bottom: 15px;
}

.incident-time i {
    margin-right: 5px;
}

.incident-description {
    color: var(--light-text);
    line-height: 1.6;
    margin-bottom: 15px;
}

.affected-services {
    font-size: 14px;
    color: var(--secondary-text);
}

/* Uptime History */
.uptime-summary {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.uptime-item {
    display: flex;
    align-items: center;
    padding: 15px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.uptime-service {
    min-width: 200px;
    font-weight: 600;
}

.uptime-periods {
    display: flex;
    gap: 30px;
    margin-left: auto;
}

.uptime-period {
    text-align: center;
}

.period-label {
    display: block;
    font-size: 12px;
    color: var(--secondary-text);
    margin-bottom: 5px;
    text-transform: uppercase;
}

.period-value {
    font-weight: 600;
    color: var(--status-operational);
}

.period-value.warning {
    color: var(--status-degraded);
}

/* Footer */
footer {
    background: var(--darker-bg);
    padding: 40px;
    text-align: center;
    margin-top: 80px;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--secondary-text);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--accent-gold);
}

.copyright {
    color: var(--secondary-text);
    font-size: 14px;
    margin-bottom: 10px;
}

.auto-refresh {
    color: var(--secondary-text);
    font-size: 12px;
    opacity: 0.7;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: rgba(201, 168, 86, 0.9);
    color: #000;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    z-index: 999;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--accent-gold);
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(201, 168, 86, 0.4);
}

/* Visual Uptime Chart */
.uptime-chart {
    margin-bottom: 30px;
}

.uptime-service-row {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.service-name-label {
    min-width: 200px;
    font-weight: 600;
    color: var(--light-text);
}

.uptime-bars {
    display: flex;
    gap: 1px;
    flex: 1;
    height: 30px;
    align-items: center;
}

.uptime-bar {
    flex: 1;
    height: 100%;
    min-width: 2px;
    cursor: pointer;
    transition: transform 0.2s ease;
    position: relative;
}

.uptime-bar:hover {
    transform: scaleY(1.2);
    z-index: 10;
}

.uptime-bar.uptime-operational {
    background: var(--status-operational);
}

.uptime-bar.uptime-degraded {
    background: var(--status-degraded);
}

.uptime-bar.uptime-down {
    background: var(--status-down);
}

.uptime-percentage {
    min-width: 60px;
    text-align: right;
    font-weight: 600;
    color: var(--accent-gold);
}

/* Uptime Legend */
.uptime-legend {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 20px 0;
    padding: 15px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--secondary-text);
}

.legend-bar {
    width: 20px;
    height: 12px;
    border-radius: 2px;
}

.legend-bar.uptime-operational {
    background: var(--status-operational);
}

.legend-bar.uptime-degraded {
    background: var(--status-degraded);
}

.legend-bar.uptime-down {
    background: var(--status-down);
}

/* Timeline */
.uptime-timeline {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    padding: 0 15px;
    color: var(--secondary-text);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Tooltips */
.uptime-bar[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 5px 10px;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    font-size: 12px;
    white-space: nowrap;
    border-radius: 4px;
    pointer-events: none;
    margin-bottom: 5px;
    z-index: 1000;
}

.uptime-bar[title]:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.9);
    pointer-events: none;
    z-index: 1000;
}

/* Collapsible Incidents Section */
.section-header.collapsible {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
    padding: 10px 0;
    transition: all 0.3s ease;
}

.section-header.collapsible:hover {
    opacity: 0.8;
}

.section-header .section-title {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 0;
}

.toggle-icon {
    font-size: 20px;
    transition: transform 0.3s ease;
    color: var(--accent-gold);
}

.incident-count {
    font-size: 16px;
    color: var(--secondary-text);
    font-weight: 500;
    background: rgba(255, 255, 255, 0.1);
    padding: 5px 15px;
    border-radius: 20px;
}

.incidents-content {
    margin-top: 20px;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Service Card Adjustments */
.service-card .service-details {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.service-card .response-time {
    margin: 0;
}

/* Remove uptime row styles since we don't need them anymore */
.uptime-row {
    display: none !important;
}

/* Responsive */
@media (max-width: 768px) {
    /* Hide any duplicate nav elements */
    .nav-toggle {
        display: none !important;
    }
    
    /* Ensure only one hamburger menu */
    .mobile-menu-btn {
        display: block !important;
    }
    
    nav .mobile-menu-btn ~ .mobile-menu-btn {
        display: none !important;
    }
    
    .main-container {
        padding: 100px 15px 40px;
    }

    .page-title {
        font-size: 36px;
    }

    .status-banner {
        flex-direction: column;
        text-align: center;
    }

    .quick-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .uptime-service {
        min-width: 120px;
    }

    .uptime-periods {
        gap: 15px;
    }

    .incident-header {
        flex-direction: column;
        gap: 10px;
    }
    
    /* Mobile specific uptime chart fixes - AGGRESSIVE */
    .uptime-chart {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .uptime-service-row {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 10px !important;
        padding: 10px !important;
        flex-wrap: nowrap !important;
        visibility: visible !important;
        opacity: 1 !important;
        min-height: 50px !important;
    }
    
    .service-name-label {
        flex: 0 0 auto !important;
        min-width: 100px !important;
        max-width: 100px !important;
        font-size: 12px !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        display: block !important;
    }
    
    .uptime-bars {
        flex: 1 !important;
        display: flex !important;
        gap: 1px !important;
        height: 30px !important;
        align-items: center !important;
        min-width: 100px !important;
        visibility: visible !important;
        opacity: 1 !important;
        background: rgba(255, 255, 255, 0.05) !important; /* Debug background */
    }
    
    .uptime-bar {
        flex: 1 !important;
        height: 100% !important;
        min-width: 1px !important;
        max-width: 5px !important;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        background-color: var(--status-operational) !important;
    }
    
    .uptime-bar.uptime-operational {
        background-color: #2ecc71 !important;
    }
    
    .uptime-bar.uptime-degraded {
        background-color: #f39c12 !important;
    }
    
    .uptime-bar.uptime-down {
        background-color: #e74c3c !important;
    }
    
    .uptime-percentage {
        flex: 0 0 auto;
        min-width: 45px;
        font-size: 12px;
        text-align: right;
    }
    
    .uptime-legend {
        flex-direction: row;
        gap: 15px;
        font-size: 12px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .legend-item {
        font-size: 12px;
    }
    
    .uptime-timeline {
        font-size: 11px;
    }
}

/* Animations */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 currentColor;
    }
    70% {
        box-shadow: 0 0 0 10px rgba(0, 0, 0, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0, 0, 0, 0);
    }
}

.status-dot.status-down {
    animation: pulse 2s infinite;
}

/* Loading state */
.loading {
    opacity: 0.5;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 4px solid var(--glass-border);
    border-radius: 50%;
    border-top-color: var(--accent-gold);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Override any injected styles from JavaScript */
.nav-toggle {
    display: none !important;
}

/* Hide any cssmenu elements that might be loaded */
#cssmenu,
#menu-button,
.menu-button,
#cssmenu #menu-button {
    display: none !important;
}

/* Force uptime bars to show on all devices */
.uptime-bars {
    display: flex !important;
}

.uptime-bar {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Enhanced mobile styles for uptime chart */
@media (max-width: 768px) {
    /* Hide duplicate navigation elements */
    #cssmenu {
        display: none !important;
    }
    
    /* Ensure proper navigation display */
    nav {
        display: block !important;
    }
    
    .nav-container {
        display: flex !important;
    }
    
    /* Fix uptime bars visibility */
    .uptime-chart {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .uptime-service-row {
        min-width: 320px;
    }
    
    .uptime-bars {
        min-height: 30px !important;
        background: transparent !important; /* Remove debug background */
    }
    
    .uptime-bar {
        flex: 1 !important;
        min-width: 2px !important;
        max-width: none !important; /* Remove max-width restriction */
        height: 30px !important;
        margin: 0 0.5px !important;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    /* Ensure colors are visible */
    .uptime-bar.uptime-operational {
        background-color: #2ecc71 !important;
    }
    
    .uptime-bar.uptime-degraded {
        background-color: #f39c12 !important;
    }
    
    .uptime-bar.uptime-down {
        background-color: #e74c3c !important;
    }
    
    /* Make service names more readable */
    .service-name-label {
        font-size: 11px !important;
        min-width: 80px !important;
        max-width: 80px !important;
    }
    
    /* Adjust percentage display */
    .uptime-percentage {
        min-width: 40px !important;
        font-size: 11px !important;
    }
}