/* Farbtöne und Schattierungen von Orange (#e67e22) nach Weiß
e67e22 ef934a f7a86e fdbe91 ffd3b5 ffe9da ffffff

Farbtöne und Schattierungen von Orange (#e67e22) nach Schwarz
e67e22 bc6820 94531c 6e3f19 4a2c14 28190d 000000 */

:root {
    --orange: #e67e22;
    --orange-dark: #bc6820;
    --orange-deep: #94531c;
    --orange-light: #f7a86e;
    --orange-soft: #ffe9da;
    --orange-darkbrown: #4a2c14;
    --red: #e74c3c;
    --black: #1e1e1e;
    --white: #ffffff;
}



.error-box {
    border: 1px solid #f44336;
    background-color: #ffebee;
    color: #b71c1c;
    padding: 12px 16px;
    margin-top: 12px;
    border-radius: 6px;
    font-weight: bold;
    font-size: 0.95em;
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

    .error-box::before {
        content: "⚠️ ";
        margin-right: 6px;
    }


@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* Design-Anpassung für fieldset */
fieldset {
    border: 2px solid orange;
    padding: 1rem;
    border-radius: 8px;
    background-color: #fffaf5; /* optional: leichtes Hintergrundweiß mit Wärme */
    margin-top: 1rem;
}

    /* Optional: Stil fürs legend */
    fieldset legend {
        font-weight: bold;
        color: var(--orange); /* #c75000; ein dunklerer Orangeton für gute Lesbarkeit */
        padding: 0 0.5rem;
    }


/* Basis-Stile */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-family: sans-serif;
    margin: 0;
    background: #fff;
    color: #222;
}

a {
    color: var(--orange);
    text-decoration: none;
    font-weight: bold;
}

    a:hover {
        text-decoration: underline;
    }

/* Header/Footer */
header,
footer {
    background: var(--black);
    color: var(--white);
    text-align: center;
    padding: 1rem;
}

    header h1 {
        margin: 0;
        font-size: 1.8rem;
    }

    footer p {
        margin: 0;
    }

/* Navigation */
nav {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    background-color: var(--orange);
    padding: 1rem;
    font-family: Arial, sans-serif;
}

    nav a {
        color: #fff;
        text-decoration: none;
        font-weight: 600;
        padding: 0.5rem 1rem;
        background-color: #ef934a;
        border-radius: 6px;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
        transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
    }

        nav a:hover {
            background-color: #94531c;
            transform: scale(1.05);
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
        }







/*/* Basis-Button-Styling */
.btn,
button,
.icon-btn {
    background: var(--orange);
    color: white;
    border: none;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    /* Für Flexbox bei icon-btn, damit Text und Icon nebeneinander sind */
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

    /* Hover für alle Buttons */
    .btn:hover,
    button:hover,
    .icon-btn:hover {
        background: #d65f00;
        box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
    }

    /* Disabled-Zustand nur für .btn und button (icon-btn vermutlich nicht disabled) */
    .btn:disabled,
    button:disabled {
        background: #ccc;
        cursor: not-allowed;
    }

/* Spezifisches Styling für icon-btn, um z.B. Padding anzupassen */

.icon-btn {
    border: 2px solid transparent;
    background: var(--orange);
    cursor: pointer;
    padding: 8px;
    margin: 4px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: border-color 0.3s ease, background-color 0.3s ease, color 0.3s ease;
    border-radius: 6px;
    color: var(--white);
}


    /* Selektierter Zustand für icon-btn */
    .icon-btn.selected {
        background: var(--orange-dark); /* kräftiges Orange */
        border-color: var(--orange-darkbrown);
        color: white;
        box-shadow: 0 0 8px var(--orange-dark); /* leichter Glüheffekt */
    }

    /* Icon in icon-btn */
    .icon-btn img {
        width: 24px;
        height: 24px;
        user-select: none;
        pointer-events: none;
        display: block;
/*        filter: brightness(0) invert(1);
*/    }


/* Gemeinsamer Container für Button + Inputs */
.flex-row {
    display: flex;
    align-items: center;
    gap: 0.5em;
    margin-left: 2em;
    margin-bottom: 1em;
}

    /* Inputs in beiden Gruppen sollen flexibel wachsen */
    .flex-row input[type="text"],
    .flex-row input[type="number"] {
        flex: 1 1 150px; /* flexibel, mit Basisbreite 150px */
        min-width: 120px; /* nie zu schmal */
        padding: 0.3em 0.5em;
        font-size: 1em;
    }

    /* Button braucht keine Flex-Anpassung, behält natürliche Breite */
    .flex-row button.icon-btn {
        white-space: nowrap; /* verhindert Zeilenumbruch im Button */
        padding: 0.4em 1em;
        font-size: 1em;
    }



#markerListWrapper {
    margin-top: 1rem;
    padding: 1rem;
    background: #fff7f0;
    border-radius: 8px;
    border: 1px solid var(--orange);
}

#markerList {
    list-style: none;
    padding: 0;
    margin: 0;
}

    #markerList li {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 6px;
        padding: 4px 8px;
        background: #fff;
        border: 1px solid #ddd;
        border-radius: 6px;
        font-size: 0.9rem;
    }

    #markerList button {
        background: var(--orange);
        color: white;
        border: none;
        padding: 0.3rem 0.6rem;
        border-radius: 4px;
        cursor: pointer;
    }






/* Formulare */
form {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
    align-items: center;
}

input[type="radio"] {
    accent-color: var(--orange);
}

input[type="checkbox"] {
    accent-color: var(--orange);
}

input[type="text"],
input[type="number"],
input[type="date"],
input[type="time"],
button {
    padding: 0.5rem 1rem;
    border-radius: 5px;
    font-size: 0.9rem;
    height: 40px;
    box-sizing: border-box;
    border: 2px solid var(--orange);
}

input[type="text"] {
    width: 10ch;
}

.input-row input[type="text"] {
    width: 25ch;
    max-width: 100%;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
    width: 6rem;
}

.input-error {
    background-color: rgba(255, 0, 0, 0.3);
}

    .input-error + .hint-text {
        color: red;
    }

.error-msg {
    color: red;
    font-size: 0.85em;
    display: none;
}

.input-error {
    border: 1px solid red;
}



#markerList li span {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-grow: 1;
    min-width: 0;
}

.marker-label-input {
    flex-grow: 1;
    min-width: 0;
    width: 50%;
    border: 1px solid #ccc;
    padding: 4px;
    font-size: 0.9rem;
}


#combined-coords {
    width: 100%;
    max-width: 308px; /* optional, falls du die Maximalbreite beibehalten willst */
}


.hint-text {
    font-size: 0.8rem;
    color: #666;
    margin-top: 4px;
    display: block;
}

/* Kartenbereich */
#map {
    width: 100%;
    max-width: 1500px; /* war 1000 */
    height: 80vh; /* war 50vh */
    margin: 1rem auto 0;
    border-radius: 8px;
    border: 2px solid var(--orange);
}



.map-container {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 20px;
    margin-top: 1rem;
}

.left-panel,
.right-panel {
    flex: 0 1 auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.left-panel {
    max-width: 300px;
}

.right-panel {
    max-width: 200px;
    justify-content: flex-start;
}

.download-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

    .download-buttons button {
        padding: 0.6em 1.2em;
    }

/* Legende */
#mapLegend,
.legend {
    font-family: sans-serif;
    background: white;
    border-radius: 8px;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
    padding: 10px 15px;
    border: 2px solid var(--orange);
    max-width: 300px;
    line-height: 1.6;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

    .legend-color.red {
        background-color: red;
    }

    .legend-color.orange {
        background-color: var(--orange);
    }

.legend svg {
    width: 20px;
    height: 20px;
    vertical-align: middle;
    margin-right: 1px;
}

.legend[contenteditable] {
    outline: 1px dashed #999;
}

.hide-map-ui .leaflet-control,
.hide-map-ui .leaflet-control-attribution {
    display: none !important;
}

/* FAQ / Hilfe */
.faq-title {
    text-align: center;
    color: var(--orange);
    font-size: 2rem;
    margin: 2rem 0;
}

.faq-item {
    background-color: var(--orange-soft);
    border-left: 6px solid var(--orange);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.faq-question {
    color: var(--orange-dark);
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.faq-answer {
    color: var(--black);
    font-size: 1rem;
    line-height: 1.6;
}

    .faq-answer p {
        margin-bottom: 1rem;
    }

    .faq-answer a {
        color: var(--orange-dark);
        font-weight: bold;
    }

        .faq-answer a:hover {
            text-decoration: underline;
        }

/* Disclaimer */
.disclaimer {
    background-color: #ffe9da;
    border: 2px solid #e67e22;
    padding: 1rem;
    border-radius: 8px;
    color: #28190d;
    font-size: 0.95rem;
    line-height: 1.5;
    max-width: 1000px;
    margin: 1.5rem auto;
}

    .disclaimer.warning {
        background-color: rgba(255, 0, 0, 0.1);
        border: 2px solid var(--red);
        color: #800000;
        font-weight: bold;
    }

/* Hilfebereich */
.help-content {
    max-width: 900px;
    margin: 0 auto;
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

    .help-content h1,
    .help-content h2,
    .help-content h3,
    .help-content h4 {
        color: var(--orange);
    }

    .help-content li,
    .help-content p {
        margin-bottom: 1rem;
    }

        .help-content li::marker,
        .help-content ol li::marker {
            color: var(--orange);
            font-weight: 550;
        }

/* Layout-Boxen */
.box {
    border: 2px solid var(--orange);
    border-radius: 8px;
    padding: 1rem;
    background-color: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    width: 100%;
    margin-bottom: 1rem;
}

/* Sprache / Flaggen */
.language-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    max-width: 100%;
    margin-top: 1rem;
}


.flag-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    white-space: normal;
}

    .flag-option img {
        width: 24px;
        height: 16px;
        border-radius: 2px;
        box-shadow: 0 0 2px rgba(0, 0, 0, 0.2);
    }

/* Toggle Button */
#toggleLanguagesBtn {
    margin: 0.5rem 0 1rem 0;
    align-self: flex-start;
}


/* Inline-Icons */
.icon-inline {
    vertical-align: middle;
    margin-right: 3px;
}


/* Tooltip */
.leaflet-tooltip.radius-label {
    background: var(--orange);
    color: white;
    font-weight: bold;
    padding: 6px 10px;
    border-radius: 4px;
    border: 2px solid var(--white);
    font-size: 1em;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.3);
}

    .leaflet-tooltip.radius-label:before {
        border-right-color: var(--white) !important;
    }



@media (max-width: 768px) {
    body {
        font-size: 14px;
        padding: 0;
        margin: 0;
    }

    /* Navigation */
    nav {
        padding: 0.5rem;
        gap: 0.5rem;
        flex-direction: column;
    }

        nav a {
            font-size: 0.9rem;
            padding: 0.4rem 0.8rem;
            width: 100%;
            text-align: center;
        }

    /* Kartenbereich */
    #map {
        height: 80vh; /* war 60vh */
    }


    .map-container {
        flex-direction: column;
        gap: 1rem;
    }

    .left-panel,
    .right-panel {
        flex: 1 1 100%;
        max-width: 100%;
    }

    .right-panel {
        gap: 1rem;
    }

    /* Formulare */
    form {
        flex-direction: column;
        align-items: stretch;
    }

        form input[type="text"],
        form input[type="number"],
        form input[type="date"],
        form input[type="time"],
        form button,
        .download-buttons button {
            width: 100%;
            font-size: 1rem;
        }

    .input-row input[type="text"] {
        width: 100%;
    }

    li span {
        display: flex;
        align-items: center;
        gap: 6px;
    }


    .marker-label-input {
        flex: 1 1 auto;
        min-width: 0;
        width: 100%;
    }



    .flex-row {
        flex-direction: column;
        align-items: stretch;
        margin-left: 0;
        gap: 0.5em;
    }

        .flex-row input[type="text"],
        .flex-row input[type="number"],
        .flex-row button.icon-btn {
            width: 100%; /* alles nimmt die volle Breite ein */
            flex: none; /* kein Flex-Grow/Shrink mehr */
        }

    #combined-coords {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    /* Allgemeine Container */
    .disclaimer,
    .help-content,
    .box {
        width: 100%;
        max-width: 100%;
        margin: 1rem auto;
        padding: 1rem;
        box-sizing: border-box;
    }


    /* FAQ Bereich */
    .faq-title {
        font-size: 1.5rem;
    }

    .faq-item {
        padding: 1rem;
        margin: 1rem 0;
    }

    .faq-question {
        font-size: 1rem;
    }

    .faq-answer {
        font-size: 0.95rem;
    }

    /* Sprache / Flaggen */
    .language-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 0.5rem;
    }

    .flag-option {
        gap: 0.3rem;
        font-size: 0.9rem;
    }

        .flag-option img {
            width: 20px;
            height: 14px;
        }

    #toggleLanguagesBtn {
        margin-bottom: 0.75rem;
    }
}

