/* Logs Page Styles */

/* Health Metrics */
.health-metric {
    padding: 0.75rem;
    transition: all 0.3s ease;
}

.health-metric:hover {
    transform: translateY(-2px);
}

.health-icon {
    transition: all 0.3s ease;
    margin-bottom: 0.5rem !important;
}

.health-icon i {
    transition: color 0.3s ease;
}

.health-status {
    min-height: 2rem;
}

/* Log Viewer */
.log-viewer {
    background: #1e1e1e;
    color: #d4d4d4;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.6;
    height: 600px;
    overflow-y: auto;
    overflow-x: auto;
    padding: 0;
    position: relative;
    max-width: 100%;
}

.log-entry {
    display: flex;
    align-items: flex-start;
    padding: 6px 12px;
    border-bottom: 1px solid #2d2d2d;
    transition: background-color 0.2s ease;
    min-width: fit-content;
}

.log-entry:hover {
    background-color: #2d2d2d;
}

.log-line-number {
    flex-shrink: 0;
    width: 50px;
    color: #858585;
    text-align: right;
    padding-right: 12px;
    user-select: none;
    font-size: 11px;
}

.log-icon {
    flex-shrink: 0;
    width: 24px;
    text-align: center;
    margin-right: 8px;
}

.log-timestamp {
    flex-shrink: 0;
    color: #858585;
    margin-right: 12px;
    font-size: 11px;
    min-width: 100px;
}

.log-message {
    flex-grow: 1;
    word-wrap: break-word;
    white-space: pre-wrap;
}

/* Log Level Colors */
.log-error {
    background-color: rgba(244, 67, 54, 0.1);
    border-left: 3px solid #f44336;
}

.log-error .log-icon {
    color: #f44336;
}

.log-error:hover {
    background-color: rgba(244, 67, 54, 0.15);
}

.log-warning {
    background-color: rgba(255, 152, 0, 0.1);
    border-left: 3px solid #ff9800;
}

.log-warning .log-icon {
    color: #ff9800;
}

.log-warning:hover {
    background-color: rgba(255, 152, 0, 0.15);
}

.log-info {
    border-left: 3px solid transparent;
}

.log-info .log-icon {
    color: #2196f3;
}

.log-debug {
    background-color: rgba(156, 39, 176, 0.05);
    border-left: 3px solid #9c27b0;
}

.log-debug .log-icon {
    color: #9c27b0;
}

.log-debug:hover {
    background-color: rgba(156, 39, 176, 0.1);
}

/* Scrollbar Styling for Log Viewer */
.log-viewer::-webkit-scrollbar {
    width: 12px;
}

.log-viewer::-webkit-scrollbar-track {
    background: #1e1e1e;
}

.log-viewer::-webkit-scrollbar-thumb {
    background: #424242;
    border-radius: 6px;
}

.log-viewer::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Quick Fix Alert */
#quick-fix-section .alert {
    border-left: 4px solid #ff9800;
}

/* Statistics Cards */
.card-body i.fs-2 {
    opacity: 0.7;
}

.card-body:hover i.fs-2 {
    opacity: 1;
    transform: scale(1.1);
    transition: all 0.3s ease;
}

/* Filter Section */
.form-label {
    margin-bottom: 0.5rem;
}

.form-select,
.form-control {
    font-size: 14px;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .log-viewer {
        height: 400px;
    }

    .log-line-number {
        width: 35px;
        font-size: 10px;
    }

    .log-timestamp {
        display: none;
    }

    .health-metric {
        margin-bottom: 1rem;
    }
}

/* Loading Animation */
@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.spinner-border {
    animation: pulse 1.5s ease-in-out infinite;
}

/* Badge Styles */
.badge {
    font-weight: 500;
    padding: 0.35em 0.65em;
}

/* Button Hover Effects */
.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
}

.btn:active {
    transform: translateY(0);
}

/* Card Hover Effects */
.card {
    transition: all 0.3s ease;
    max-width: 100%;
}

.card:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1) !important;
}

/* Fade-in Animations */
.fade-in {
    animation: fadeIn 0.5s ease-in;
    margin-bottom: 0;
}

.fade-in.delay-1 {
    animation-delay: 0.1s;
    opacity: 0;
    animation-fill-mode: forwards;
    margin-top: 0;
}

.fade-in.delay-2 {
    animation-delay: 0.2s;
    opacity: 0;
    animation-fill-mode: forwards;
}

.fade-in.delay-3 {
    animation-delay: 0.3s;
    opacity: 0;
    animation-fill-mode: forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Health Status Colors */
.text-success {
    color: #28a745 !important;
}

.text-danger {
    color: #dc3545 !important;
}

.text-warning {
    color: #ffc107 !important;
}

.text-muted {
    color: #6c757d !important;
}

/* Auto-refresh Toggle */
.form-check-input:checked {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.form-check-label {
    cursor: pointer;
    user-select: none;
}

/* Fix for horizontal scrollbar and spacing issues */
body {
    overflow-x: hidden;
}

.row {
    margin-left: 0;
    margin-right: 0;
}

.row>* {
    padding-left: calc(var(--bs-gutter-x) * 0.5);
    padding-right: calc(var(--bs-gutter-x) * 0.5);
}

/* Logs page specific - reduce top padding */
main {
    padding-top: 0.75rem !important;
    padding-bottom: 0.75rem !important;
}

/* Remove extra spacing from page elements */
.display-6 {
    margin-bottom: 0.25rem !important;
}

/* Ensure content is visible */
.fade-in {
    opacity: 1 !important;
}

/* Adjust log viewer height to fit viewport */
.log-viewer {
    max-height: calc(100vh - 450px);
    min-height: 400px;
}