/* css/geosearch.css */

/* --- Global & Layout --- */
body {
    background-color: #f5f7f9;
    padding-top: 40px;
    padding-bottom: 40px;
}

.main-card {
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    border: none;
}

.card-header {
    background: linear-gradient(45deg, #0d6efd, #0a58ca);
    color: white;
    border-radius: 15px 15px 0 0 !important;
    padding: 20px;
    text-align: center;
    position: relative;
}

.card-header h2 {
    margin: 0;
    font-weight: 500;
    font-size: 1.5rem;
}

/* --- Section Titles --- */
.section-title {
    color: #0d6efd;
    font-weight: 600;
    margin-top: 25px;
    margin-bottom: 15px;
    font-size: 1.1rem;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

/* --- Result Boxes (Ausgabefelder) --- */
.result-box {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 10px;
    height: 100%;
    border: 1px solid #e0e0e0;
    transition: transform 0.2s;
}

.result-box:hover {
    border-color: #0d6efd;
    background-color: #fff;
}

.result-label {
    font-size: 0.75rem !important;
    color: #6c757d;
    margin-bottom: 4px;
    font-weight: 700;
    text-transform: none !important; /* WICHTIG: Ändert 'uppercase' zu 'none' */
    letter-spacing: 0.3px; /* Etwas reduziert, da kein Uppercase mehr */
    display: flex;
    align-items: center;
}

/* Tooltip Icon Größe & Stil (Konsolidiert) */
.result-label .fa-question-circle {
    font-size: 1.1rem !important; /* Mittelgröße: Deutlich sichtbar, aber nicht dominant */
    vertical-align: middle !important;
    margin-left: 4px !important;
    opacity: 0.7;
    transition: all 0.2s ease;
    cursor: help !important;
    width: auto !important;
    height: auto !important;
    display: inline-block !important;
    color: #6c757d !important; /* Standardfarbe grau */
}

.result-label .fa-question-circle:hover {
    color: #0d6efd !important; /* Blau beim Hover */
    opacity: 1 !important;
    transform: scale(1.1) !important;
}

.result-value {
    font-size: 1.35rem; /* Vergrößert für bessere Lesbarkeit */
    color: #212529;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.result-value.wrap-text {
    white-space: normal;
    overflow: visible;
    word-break: break-word;
}

/* Spezifische Betonung für wichtige Felder */
#res_field1, #res_field2, #res_field8 {
    font-weight: 900;
    color: #0d6efd;
}

/* --- Status Container --- */
.status-container {
    margin-top: 15px;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
}

.status-text {
    font-size: 0.95rem;
}

/* Status Farben */
.text-location { color: #0d6efd; }
.text-send { color: #198754; }
.text-error { color: #dc3545; }
.text-airport { color: #6610f2; }

/* --- Switch Container (Einheiten) --- */
.switch-container {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    color: #555;
    background: #f1f3f5;
    padding: 6px 12px;
    border-radius: 25px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.switch-group {
    display: flex;
    align-items: center;
    gap: 4px;
}

.switch-label-active {
    font-weight: bold;
}

/* Switch Farben */
.text-c { color: #0d6efd; }
.text-f { color: #dc3545; }
.text-m { color: #0d6efd; }
.text-ft { color: #fd7e14; }
.text-hpa { color: #0d6efd; }
.text-inhg { color: #6610f2; }

.divider-v {
    width: 1px;
    height: 18px;
    background: #ccc;
    margin: 0 2px;
}

/* --- Sprachumschalter --- */
.lang-switch {
    position: absolute;
    top: 10px;
    right: 15px;
    z-index: 10;
}

.lang-btn {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.4);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.75rem;
    text-decoration: none;
    display: inline-block;
}

.lang-btn:hover {
    background: rgba(255,255,255,0.4);
    color: white;
}

.lang-btn.active {
    background: white;
    color: #0d6efd;
    font-weight: bold;
    border-color: white;
}

/* --- Airport Liste im Modal --- */
.airport-list {
    max-height: 400px;
    overflow-y: auto;
}

.airport-item {
    cursor: pointer;
    padding: 10px;
    border-bottom: 1px solid #eee;
    transition: background 0.2s;
}

.airport-item:hover {
    background-color: #f0f7ff;
}

.airport-name {
    font-weight: bold;
    color: #333;
}

.airport-meta {
    font-size: 0.8rem;
    color: #666;
}

/* --- Button Layout Optimierung (Konsolidiert & Bereinigt) --- */

/* Mobile Ansicht (unter 768px) */
@media (max-width: 767px) {
    /* Senden-Button: Vollbreit für einfache Bedienung */
    #btnSendData {
        width: 100% !important;
        font-size: 0.95rem;
        padding: 0.5rem 0.8rem;
        justify-content: center;
        display: flex;
        align-items: center;
    }
    
    /* Hilfsbuttons: Zentriert unter dem Senden-Button */
    .order-2 {
        justify-content: center !important;
        width: 100% !important;
    }
    
    /* Buttons generell etwas kompakter auf sehr kleinen Screens */
    .btn-sm {
        font-size: 0.85rem;
        padding: 0.4rem 0.6rem;
    }
}

/* Desktop Ansicht (ab 768px) */
@media (min-width: 768px) {
    /* Senden-Button: Volle Breite des Containers nutzen */
    #btnSendData {
        width: 100% !important;   <-- ÄNDERUNG: Volle Breite
        min-width: auto;          <-- Mindestbreite entfernen
        font-size: 1rem;
        padding: 0.8rem 1.2rem;   <-- Etwas mehr Padding für bessere Proportion auf breiter Fläche
        justify-content: center;  <-- Text zentrieren
        display: flex;            <-- Flexbox sicherstellen
        align-items: center;
    }
    
    /* Hilfsbuttons: Links bündig */
    .order-md-1 {
        justify-content: flex-start !important;
    }
}

/* Input Highlight (optional) */
.input-highlight {
    border-color: #198754 !important;
    background-color: #f0fff4 !important;
    font-weight: bold;
    color: #198754;
    transition: all 0.3s ease;
}

/* Spezifische Anpassung für das nMET + Dist Feld */
#res_field5 {
    font-size: 1.0rem !important; /* Deutlich kleiner als die Standard 1.35rem */
    line-height: 1.4; /* Etwas mehr Zeilenabstand für bessere Lesbarkeit bei Umbrüchen */
    white-space: normal; /* Umbrüche erlauben */
    overflow: visible;
    word-break: break-word; /* Lange Wörter umbrechen falls nötig */
}

/* Spinner Abstand optimieren */
#globalSpinner {
    margin-right: 12px !important; /* Erhöht von standardmäßig ca. 10px auf 12px */
}

/* Falls der Spinner die Klasse .spinner-border-sm hat, auch dort anpassen */
.spinner-border-sm {
    margin-right: 12px !important;
}
/* Buttons neben der Sektions-Überschrift */
.section-title {
    /* Flexbox wird bereits genutzt, aber wir stellen sicher, dass der Inhalt verteilt wird */
    justify-content: space-between; 
    align-items: center;
}

.action-buttons {
    display: flex;
    gap: 8px; /* Abstand zwischen den beiden kleinen Buttons */
    flex-shrink: 0; /* Verhindert, dass die Buttons gequetscht werden */
}

/* Auf sehr kleinen Handys: Buttons unter den Text setzen */
@media (max-width: 575px) {
    .section-title {
        flex-direction: column;
        align-items: flex-start; /* Links bündig ausrichten */
        gap: 10px;
    }
    
    .action-buttons {
        width: 100%;
        justify-content: flex-start; /* Oder center, wenn sie zentriert sein sollen */
    }
    
    /* Buttons etwas kompakter auf Handy */
    .action-buttons .btn-sm {
        font-size: 0.8rem;
        padding: 0.35rem 0.5rem;
    }
}

.section-title {
	font-size: 1.1rem !important; /* Schriftgröße etwas kleiner */
	margin-top: 0.5rem !important; /* Oberer Abstand reduziert */
	margin-bottom: 0.8rem !important; /* Unterer Abstand reduziert */
	line-height: 1.2; /* Zeilenhöhe straffer */
	font-weight: 600; /* Etwas weniger fett als standard bold */
}

/* Optional: Den Switch-Container etwas näher an die Überschrift rücken */
.section-title + .switch-container {
	margin-top: -5px; 
}

.map-link-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}
.map-link-icon:hover {
    transform: scale(1.1);
    opacity: 0.8;
}

@media (max-width: 360px) {
    #currentLocationInfo > div[style*="margin-left: auto"] {
        gap: 6px !important;
    }
    .map-link-icon i {
        font-size: 1rem; /* Etwas kleiner auf sehr kleinen Screens */
    }
}