/* HALO Web Application Styles - Bootstrap Enhanced */

:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
}

/* Custom additions to Bootstrap */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* Remove dropdown caret/triangle */
.dropdown-toggle::after {
    display: none !important;
}

/* Language switcher active state */
#lang-de.btn-light,
#lang-en.btn-light {
    font-weight: bold;
}

/* Language switcher focus state - prevent white on white */
#lang-de.btn-light:focus,
#lang-en.btn-light:focus {
    background-color: #e9ecef;
    border-color: #dee2e6;
    color: #212529;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Disabled select options styling */
select option:disabled {
    color: #999999;
    background-color: white;
}

/* Active menu item */
.nav-link.active {
    font-weight: bold;
    color: #0d6efd !important;
    background-color: rgba(13, 110, 253, 0.1) !important;
    border-radius: 0.25rem;
}

/* Statistics report - ensure black text */
.statistics-report {
    color: #000000 !important;
}

/* Increase spacing between menu items */
.navbar-nav .nav-item {
    margin-left: 1rem;
    margin-right: 1rem;
}

/* Blue border on hover for all menu items */
.navbar-nav .nav-link.menu-title:hover,
.navbar-nav .dropdown-toggle.menu-title:hover {
    border: 2px solid #0d6efd;
    border-radius: 0.25rem;
}

/* Remove Bootstrap default dropdown and nav-link styling */
.navbar-nav .nav-link.menu-title,
.navbar-nav .dropdown-toggle.menu-title {
    background-color: transparent !important;
}

.navbar-nav .nav-link.menu-title:hover,
.navbar-nav .nav-link.menu-title:focus,
.navbar-nav .dropdown-toggle.menu-title:hover,
.navbar-nav .dropdown-toggle.menu-title:focus,
.navbar-nav .dropdown-toggle.menu-title.show {
    background-color: transparent !important;
    color: inherit !important;
}

/* Stat cards hover effect */
.card {
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15) !important;
}


/* Main Content */
main {
    padding: 2rem 0;
}

/* Footer */
footer {
    background-color: var(--primary-color);
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
}

/* Table header color alignment for observers/observations */
.table thead.bg-primary th,
.table thead.bg-primary td {
    background-color: var(--primary-color) !important;
    color: #fff !important;
}

/* Analysis results table with blue background matching Pascal DOS original */
.analysis-table {
    margin-top: 1rem;
}

.analysis-table thead {
    background-color: #5555ff !important;
    color: white !important;
}

.analysis-table thead th {
    background-color: #5555ff !important;
    color: white !important;
    border-color: #3333dd !important;
    text-align: center !important;
}

/* First column (row headers) should match header blue */
.analysis-table tbody th {
    background-color: #5555ff !important;
    color: white !important;
    border-color: #3333dd !important;
}

/* Monthly report header should be left-aligned to match monospace content */
.analysis-table thead th.monthly-report-header {
    text-align: left !important;
}

.analysis-table tbody tr {
    background-color: #f8f9fa;
}

.analysis-table tbody tr:nth-child(even) {
    background-color: #e9ecef;
}

.analysis-results h4 {
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.analysis-results .restrictions {
    margin-bottom: 1rem;
    font-style: italic;
    color: #666;
}

/* Print styles */
@media print {
    @page {
        margin: 0.3cm;
    }
    
    body {
        margin: 0;
        padding: 0.2cm;
    }
    
    .analysis-table {
        font-size: 8pt;
    }
    
    .analysis-table th,
    .analysis-table td {
        padding: 2px 4px;
    }
}

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

/* ============================================================================
   Observations Page Styles
   ============================================================================ */

/* Compact Display (Kurz mode) */
.observations-compact-container {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.compact-header {
    background-color: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
}

.compact-header pre {
    margin: 0;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.85rem;
    font-weight: bold;
}

.compact-body {
    max-height: 600px;
    overflow-y: auto;
    padding: 0.5rem 1rem;
}

.compact-body pre {
    margin: 0;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.85rem;
    line-height: 1.4;
    white-space: pre;
}

.compact-body pre .obs-line {
    display: block;
    padding: 0.2rem 0;
}

.compact-body pre .obs-line:hover {
    background-color: #f0f2f5;
}

/* Detailed Display (Lang mode) */
.observations-detail-container {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 2rem;
    margin-bottom: 1.5rem;
}

#detail-content {
    min-height: 400px;
    font-family: monospace;
    line-height: 1.8;
}

.detail-field {
    margin-bottom: 0.5rem;
}

.detail-field strong {
    display: inline-block;
    width: 220px;
    color: var(--primary-color);
}

.detail-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

#detail-counter {
    color: #666;
    font-size: 0.9rem;
}
/* Field Constraint Indicators */
.constraint-indicator {
    font-style: normal;
    position: relative;
}

.constraint-indicator.constrained {
    font-style: italic;
    text-decoration: underline dotted;
    text-decoration-color: #f57c00;
    text-underline-offset: 3px;
    cursor: help;
}

/* Tooltip styling - only show when field is constrained */
.constraint-indicator .tooltip-text {
    visibility: hidden;
    position: absolute;
    z-index: 10001;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    white-space: normal;
    width: 250px;
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 0.5rem 0.75rem;
    border-radius: 0.25rem;
    font-size: 0.85rem;
    font-weight: normal;
    font-style: normal;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

/* Only show tooltip on hover when field is constrained */
.constraint-indicator.constrained:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

.constraint-indicator .tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #333;
}

/* Allow HTML formatting in tooltip */
.constraint-indicator .tooltip-text strong {
    font-weight: bold;
}

