/**
 * footer.css
 * Styling für die Footer-Bar in der GearBase-Anwendung.
 * @version 0.6.79
 * @date 2025-04-02
 * @author GearBase
 * @description Definiert das Aussehen der Footer-Bar mit Disclaimer, Cookie-Infos, Links und Kontaktformular (als Pop-up).
 */

.footer-bar {
    background-color: rgba(37, 15, 17, 0.9);
    color: #fff;
    padding: 20px 0;
    width: 100%;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9em;
    border-top: 1px solid rgba(221, 221, 221, 0.3);
    position: relative;
    z-index: 10;
}

.footer-container {
    display: flex;
    justify-content: space-around;
    align-items: center;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
    flex-wrap: wrap;
}

.footer-section {
    margin: 10px 0;
    text-align: center;
}

.footer-section a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
}

.footer-section a:hover {
    color: #b84c4c;
}

.footer-section.links ul {
    list-style: none;
    padding: 0;
    margin: 5px 0 0 0;
}

.footer-section.links li {
    margin: 5px 0;
}

.footer-section.links span {
    font-weight: bold;
}

.contact-btn {
    background-color: #555;
    color: #fff;
    border: none;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 0.9em;
    border-radius: 3px;
}

.contact-btn:hover {
    background-color: #777;
}

.footer-bottom {
    text-align: center;
    padding-top: 10px;
    font-size: 0.8em;
    opacity: 0.8;
}


.select2-container--open .select2-dropdown {
    z-index: 1052 !important; /* Über Modal */
    position: absolute !important;
}
.select2-container--open .select2-dropdown--below {
    top: 100% !important;
    margin-top: 2px;
}

/* Modal (Pop-up) Styling */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    z-index: 1050;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
}

.modal-content {
    background: #1c1c1a;
    color: #ccc;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 24px;
    max-width: 400px;
    width: 90%;
    position: relative;
    margin: auto;
}

/* Modal-Breiten-/Layout-Modifier (v0.61.0) — ersetzen die frühere Sonderklasse
   .modal-help-content. Komponierbar auf .modal-content:
   --wide  = breites Modal (z. B. Einreichen-Formular, Hilfe)
   --flush = randloser Inhalt (z. B. Hilfe-Seite mit eigenem Layout) */
.modal-content--wide {
    max-width: 900px;
}
.modal-content--flush {
    padding: 0;
    overflow: hidden;
}

/* ── „Diesen Eintrag verbessern"-Modal (v0.61.0) ──────────────────────────── */
.improve-box { color: #ccc; }
.improve-title {
    margin: 0 0 6px;
    font-size: 15px;
    color: #c8a87a;
    letter-spacing: 0.04em;
}
.improve-context { margin: 0 0 4px; font-size: 13px; color: #ddd; }
.improve-context .improve-cur-map { color: rgba(255,255,255,0.55); }
.improve-hint { margin: 0 0 14px; font-size: 12px; color: rgba(255,255,255,0.45); }

.improve-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    padding-bottom: 10px;
}
.improve-tab {
    background: #2a2a27;
    color: #bbb;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 5px;
    padding: 7px 12px;
    cursor: pointer;
    font-size: 12.5px;
    transition: background 0.2s, color 0.2s;
}
.improve-tab:hover { background: #333330; }
.improve-tab.is-active {
    background: #3d3d39;
    border-color: rgba(200, 168, 122, 0.45);
    color: #f0e6d6;
}

.improve-section { margin-bottom: 6px; }
.improve-box label {
    display: block;
    margin: 12px 0 5px;
    font-size: 12.5px;
    color: #cfcfcf;
}
.improve-box label small { color: rgba(255,255,255,0.4); }
.improve-box select,
.improve-box input[type="text"],
.improve-box textarea {
    width: 100%;
    box-sizing: border-box;
    background: #141413;
    color: #eee;
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 5px;
    padding: 8px 10px;
    font-size: 13px;
}
.improve-box select:focus,
.improve-box input[type="text"]:focus,
.improve-box textarea:focus {
    outline: none;
    border-color: #c8a87a;
}
.improve-box select:disabled { opacity: 0.5; }
.improve-box textarea { resize: vertical; }

/* US5b: typabhängiges „Korrigierter Wert"-Control (Zahlfeld + checkbox-Chips) */
.improve-box input[type="number"].improve-value-control {
    width: 100%; box-sizing: border-box; background: #141413; color: #eee;
    border: 1px solid rgba(255,255,255,0.14); border-radius: 5px; padding: 8px 10px; font-size: 13px;
}
.improve-box input[type="number"].improve-value-control:focus { outline: none; border-color: #c8a87a; }
.imp-multi-group { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 6px; }
.imp-multi-chip {
    display: inline-flex; align-items: center; gap: 5px; margin: 0; padding: 3px 10px;
    border: 1px solid rgba(255,255,255,0.18); border-radius: 12px; background: rgba(255,255,255,0.04);
    color: #ddd; font-size: 12px; cursor: pointer; user-select: none;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.imp-multi-chip .imp-multi { position: absolute; opacity: 0; width: 0; height: 0; margin: 0; pointer-events: none; }
.imp-multi-chip:hover { border-color: #c8a87a; }
.imp-multi-chip:has(.imp-multi:checked) { background: rgba(200,168,122,0.22); border-color: #c8a87a; color: #f4ead6; }
.imp-multi-add { display: flex; gap: 6px; }
.imp-multi-add input { flex: 1; }
.imp-multi-add button {
    flex: 0 0 auto; padding: 4px 12px; border: 1px solid rgba(255,255,255,0.18);
    border-radius: 5px; background: rgba(255,255,255,0.04); color: #ddd; cursor: pointer;
}
.imp-multi-add button:hover { border-color: #c8a87a; }

/* Material-Tabs im Verbessern-Formular (v0.93.0) — auf .improve-box gescopet */
/* Unterstrich-Tabs — klar abgesetzt von den auswaehlbaren Chip-Werten. */
.improve-box .gb-mtab-bar {
    display: flex; flex-wrap: wrap; gap: 2px;
    margin-bottom: 10px; border-bottom: 1px solid rgba(255,255,255,0.12);
}
.improve-box .gb-mtab {
    padding: 5px 10px 7px; border: none; background: none;
    border-bottom: 2px solid transparent; margin-bottom: -1px;
    color: #9a9488; font-size: 12px; font-weight: 600; cursor: pointer; user-select: none;
}
.improve-box .gb-mtab:hover { color: #ddd; }
.improve-box .gb-mtab.is-active { color: #f0e6d6; border-bottom-color: #c8a87a; }
.improve-box .imp-multi-group[hidden] { display: none; }

.improve-current {
    margin-top: 8px;
    font-size: 12.5px;
    color: rgba(255,255,255,0.6);
}
.improve-current span { color: #e0d4c0; }

.improve-error {
    margin: 12px 0 0;
    padding: 8px 10px;
    border-radius: 5px;
    background: rgba(153,21,21,0.18);
    border: 1px solid rgba(153,21,21,0.5);
    color: #e9b8b8;
    font-size: 12.5px;
}
.improve-success { text-align: center; padding: 14px 4px; }
.improve-success p { color: #8fce8f; font-size: 14px; margin: 0 0 14px; }

.improve-actions {
    display: flex;
    gap: 10px;
    margin-top: 18px;
}

.modal-content h3 {
    margin: 0 0 16px;
    font-size: 14px;
    color: #c8a87a;
    letter-spacing: 0.05em;
    text-align: center;
}

.modal-content button {
    background: #333330;
    color: #ccc;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 5px;
    padding: 7px 14px;
    cursor: pointer;
    font-size: 12px;
    transition: background 0.2s;
}

.modal-content button:hover {
    background: #3d3d39;
    border-color: rgba(200, 168, 122, 0.45);
    color: #e0d4c0;
}

/* Einreichen-Modal: Button-Hover folgt der im Formular gewählten Kategorie-Akzentfarbe.
   --supercategory-color / --supercategory-text-color werden von submit_gear.php
   (updateFormColor) auf die .modal-content gesetzt. ID-Spezifität schlägt die
   globale Regel oben; alle ANDEREN Modals behalten den Standard-Braun-Hover.
   Fallback = Braun, solange noch keine Kategorie gewählt ist. */
#submit-gear-modal .modal-content button:hover {
    background: var(--supercategory-color, #6B4E31);
    border-color: var(--supercategory-color, #6B4E31);
    color: var(--supercategory-text-color, #e0d4c0);
}

.close-btn {
    position: absolute;
    top: 12px;
    right: 16px;
    font-size: 20px;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.25);
    line-height: 1;
    background: none;
    border: none;
    padding: 4px;
    transition: color 0.2s;
    /* Größe bleibt fix — kein Sprung */
}

.close-btn:hover {
    color: rgba(255, 255, 255, 0.7);
    /* font-size und margin komplett weg */
}





.contact-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 8px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 3px;
    box-sizing: border-box;
}

.contact-form textarea {
    height: 80px;
    resize: vertical;
}

/* Senden-Button erbt den App-Standard (.modal-content button: #333330 + Gold-Hover);
   die alten blauen .contact-form button-Regeln wurden entfernt (passten nicht zum
   dunklen Gold/Grau-Design). */

/* ── Kontaktformular neu (Phase 1, v0.64.0) ── */
.cf-hint {
    font-size: 0.85em;
    line-height: 1.45;
    color: #555;
    background: #f4f3ef;
    border: 1px solid #e2e0d8;
    border-left: 3px solid #c8a87a;
    border-radius: 4px;
    padding: 8px 10px;
    margin: 0 0 14px;
}
/* Honeypot: für Menschen unsichtbar (nicht display:none — manche Bots überspringen das) */
.cf-hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
.cf-optional { font-weight: normal; color: #999; font-size: 0.85em; }
.cf-feedback { font-size: 0.88em; margin-bottom: 10px; }
.cf-feedback--error { color: #b3261e; }
.cf-success { text-align: center; padding: 22px 10px; color: #2e7d32; font-weight: bold; }
/* Senden-Button: Farbe vom App-Standard (.modal-content button), nur Breite ergänzt */
.cf-submit { width: 100%; margin-top: 4px; }
.cf-submit:disabled { opacity: 0.6; cursor: not-allowed; }

/* ── Gear-Detail-Modal ──────────────────────────────────────────────────── */
.modal-gear-detail {
    background: #1c1c1a;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 0;
    max-width: 640px;
    width: 92%;
    position: relative;
    margin: auto;
    overflow: hidden;
}

.gd-loading {
    padding: 48px;
    text-align: center;
    color: rgba(255,255,255,0.35);
    font-size: 0.9em;
    letter-spacing: 0.08em;
}

.gd-error {
    padding: 24px;
    color: #c07070;
    text-align: center;
}

.gd-header {
    padding: 20px 20px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    padding-right: 44px; /* Platz für Close-Button */
}

.gd-title {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: baseline;
    margin-bottom: 4px;
}

.gd-brand {
    font-size: 1.15em;
    font-weight: 600;
    color: #c8a87a;
}

.gd-model {
    font-size: 1.05em;
    color: #e0d4c0;
}

.gd-category {
    font-size: 0.78em;
    color: rgba(255,255,255,0.35);
    letter-spacing: 0.03em;
}

.gd-body {
    padding: 16px 20px;
}

/* Icons-Leiste */
.gd-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.gd-icon-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 0.7em;
    color: rgba(255,255,255,0.7);
}

.gd-icon-item img {
    width: 24px;
    height: 24px;
}

.gd-icon--off {
    opacity: 0.25;
}

/* Felder-Liste */
.gd-fields {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 6px 16px;
    margin: 0;
}

.gd-fields dt {
    color: rgba(255,255,255,0.45);
    font-size: 0.82em;
    padding-top: 2px;
    white-space: nowrap;
}

.gd-fields dd {
    margin: 0;
    color: #ddd;
    font-size: 0.9em;
    word-break: break-word;
}

.gd-comment {
    font-size: 0.85em !important;
    line-height: 1.5;
    color: rgba(255,255,255,0.6) !important;
}

/* Tags */
.gd-tag {
    display: inline-block;
    background: rgba(200,168,122,0.12);
    border: 1px solid rgba(200,168,122,0.25);
    border-radius: 3px;
    padding: 1px 6px;
    font-size: 0.78em;
    color: #c8a87a;
    margin: 2px 2px 2px 0;
}

/* Action-Buttons */
.gd-actions {
    display: flex;
    gap: 10px;
    padding: 14px 20px 18px;
    border-top: 1px solid rgba(255,255,255,0.07);
    flex-wrap: wrap;
}

.gd-btn {
    display: inline-block;
    padding: 7px 16px;
    border-radius: 5px;
    font-size: 0.82em;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    background: #333330;
    color: #ccc;
    border: 1px solid rgba(255,255,255,0.08);
}

.gd-btn:hover {
    background: #3d3d39;
    border-color: rgba(200, 168, 122, 0.45);
    color: #e0d4c0;
}

.gd-btn--muted {
    background: transparent;
    color: rgba(255,255,255,0.3);
    border-color: rgba(255,255,255,0.06);
}

.gd-btn--muted:hover {
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.6);
    border-color: rgba(255,255,255,0.15);
}

.gd-btn--fav {
    background: transparent;
    color: rgba(200,168,122,0.6);
    border-color: rgba(200,168,122,0.2);
}

.gd-btn--fav:hover {
    background: rgba(200,168,122,0.1);
    color: #c8a87a;
    border-color: rgba(200,168,122,0.4);
}

.gd-btn--fav-active {
    background: rgba(200,168,122,0.15);
    color: #c8a87a;
    border-color: rgba(200,168,122,0.45);
}

.gd-btn--fav-active:hover {
    background: rgba(200,80,80,0.1);
    color: #e88;
    border-color: rgba(200,80,80,0.3);
}

@media (max-width: 768px) {
    .footer-container {
        flex-direction: column;
        align-items: center;
    }

    .footer-section {
        margin: 15px 0;
    }

    .modal-content {
        width: 95%;
        max-width: 350px;
    }

    .modal-gear-detail {
        width: 96%;
    }

    .gd-fields {
        grid-template-columns: 1fr;
    }

    .gd-fields dt {
        margin-top: 8px;
        margin-bottom: 0;
    }
}

/* === Dedup-Autocomplete (v0.95.0) ===
   Gemeinsam für Submit-Formular (.gb-form) und Verbesserungs-Modal (.improve-box).
   In footer.css, weil app-weit geladen → in beiden Kontexten verfügbar. */

/* Positionier-Anker für das absolute Dropdown */
.gb-form .form-field { position: relative; }
.improve-box #improve-field-value-wrap { position: relative; }

.gb-ac {
    position: absolute;
    z-index: 60;
    left: 0;
    right: 0;
    top: 100%;
    margin-top: 2px;
    max-height: 240px;
    overflow-y: auto;
    background: #17140f;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 6px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
}
.gb-ac-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 7px 10px;
    font-size: 0.85em;
    color: #f0e9da;
    cursor: pointer;
}
.gb-ac-item.is-active,
.gb-ac-item:hover {
    background: rgba(200, 168, 122, 0.14);
}
.gb-ac-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.gb-ac-pending {
    flex-shrink: 0;
    font-size: 0.82em;
    color: #c8a87a;
    opacity: 0.85;
    white-space: nowrap;
}

/* Dup-Hinweis unter dem Modell-Feld (weich, nie blockierend) */
.dup-hint {
    margin: 4px 2px 10px;
    padding: 7px 10px;
    font-size: 0.82em;
    line-height: 1.4;
    color: #e0cfa6;
    background: rgba(200, 168, 122, 0.10);
    border: 1px solid rgba(200, 168, 122, 0.28);
    border-radius: 6px;
}
.dup-hint-link { color: #c8a87a; text-decoration: underline; }
.dup-hint-link:hover { color: #e0cfa6; }
.dup-hint-pending { color: #c8a87a; opacity: 0.85; }
