/* D1 Global Footer Styles */
.d1-footer {
    background: var(--bs-body-bg);
    border-top: 1px solid var(--bs-border-color);
    padding: 1.5rem 0 1rem;
    margin-top: 4rem;
    font-size: 0.875rem;
}

.d1-footer .container-fluid {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Footer Top Row */
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--bs-border-color);
    gap: 1rem;
    flex-wrap: wrap;
}

.footer-info {
    color: var(--bs-secondary-color);
    font-size: 0.8rem;
}

.footer-info strong {
    color: var(--bs-body-color);
    font-weight: 600;
}

.footer-separator {
    margin: 0 0.5rem;
    opacity: 0.5;
}

.footer-links {
    display: flex;
    gap: 1rem;
}

.footer-links a {
    color: var(--bs-secondary-color);
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
}

.footer-links a:hover {
    color: var(--bs-primary);
}

/* Heartbeat Section - Compact, below the line */
.heartbeat-section-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    padding-top: 0.5rem;
}

.heartbeat-section {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
    font-size: 0.75rem;
    color: var(--bs-secondary-color);
}

.heartbeat-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
}

.heartbeat-pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #6c757d;
    flex-shrink: 0;
}

.heartbeat-pulse.online {
    background: #198754;
}

.heartbeat-pulse.offline {
    background: #dc3545;
}

.heartbeat-server {
    font-weight: 500;
    font-size: 0.75rem;
    color: var(--bs-secondary-color);
    display: inline-flex;
    align-items: center;
}

.heartbeat-status {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--bs-secondary-color);
}

.heartbeat-status.online {
    color: #198754;
}

.heartbeat-status.offline {
    color: #dc3545;
}

.heartbeat-details {
    display: inline-flex;
    gap: 0.5rem;
    font-size: 0.7rem;
    color: var(--bs-secondary-color);
    align-items: center;
}

.heartbeat-detail {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    white-space: nowrap;
    font-size: 0.7rem;
    color: var(--bs-secondary-color);
}

.heartbeat-detail i {
    font-size: 0.65rem;
    opacity: 0.7;
}

/* Responsive */
@media (max-width: 768px) {
    .d1-footer {
        padding: 1.5rem 0 1rem;
    }

    .d1-footer .container-fluid {
        padding: 0 1rem;
    }
    
    .heartbeat-section {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .heartbeat-indicator {
        justify-content: center;
    }
    
    .heartbeat-details {
        justify-content: center;
        gap: 0.75rem;
    }

    .heartbeat-detail {
        font-size: 0.75rem;
        padding: 0.25rem 0.6rem;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }
    
    .footer-info,
    .footer-links {
        width: 100%;
        justify-content: center;
    }
}

/* Dark Mode Adjustments */
[data-bs-theme="dark"] .d1-footer {
    border-top-color: rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] .heartbeat-detail {
    background: rgba(255, 255, 255, 0.05);
}

/* Tron Mode */
body.tron-mode .d1-footer {
    border-top: 2px solid var(--tron-cyan) !important;
    box-shadow: 0 -2px 20px rgba(0, 217, 255, 0.2);
    background: rgba(0, 10, 31, 0.8) !important;
}

body.tron-mode .heartbeat-indicator {
    border: 2px solid var(--tron-cyan) !important;
    box-shadow: 0 0 15px var(--tron-cyan) !important;
    background: rgba(0, 10, 31, 0.9) !important;
}

body.tron-mode .heartbeat-pulse.online {
    background: var(--tron-cyan) !important;
    box-shadow: 0 0 15px var(--tron-cyan) !important;
}

body.tron-mode .heartbeat-server,
body.tron-mode .heartbeat-status.online {
    color: var(--tron-cyan) !important;
    text-shadow: 0 0 8px var(--tron-cyan);
}

body.tron-mode .heartbeat-detail {
    border-color: var(--tron-grid) !important;
    background: rgba(0, 10, 31, 0.7) !important;
    color: rgba(0, 217, 255, 0.8) !important;
}

body.tron-mode .footer-info,
body.tron-mode .footer-links a {
    color: rgba(0, 217, 255, 0.7) !important;
}

body.tron-mode .footer-links a:hover {
    color: var(--tron-cyan) !important;
    text-shadow: 0 0 5px var(--tron-cyan);
}

body.tron-mode .footer-bottom {
    border-top-color: var(--tron-grid) !important;
}
