/**
 * LDR Elements — Element „Auswahl-Button“ (Choice Button)
 *
 * @author    AGENTUR LEDERER https://lederer.nrw
 * @copyright Copyright (C) 2026 AGENTUR LEDERER
 * @license   GNU General Public License version 3 or later
 *
 * Die Optik kommt aus YOOtheme/UIkit (Button, Dropdown, Nav, Modal). Hier steht
 * nur, was das Element darüber hinaus braucht. Dropdown und Pop-ups hängen beim
 * Öffnen am Seitenkörper — die Regeln dürfen deshalb nicht von .ldr-choice
 * als Vorfahre abhängen.
 */

.ldr-choice-drop {
    min-width: 220px;
    max-width: min(360px, calc(100vw - 30px));
}

.ldr-choice-hinweis {
    margin: 0 0 10px;
    font-size: 0.875rem;
    opacity: 0.75;
}

h2.ldr-choice-hinweis {
    opacity: 1;
    margin-bottom: 15px;
    padding-right: 30px;
}

.ldr-choice-nav .ldr-choice-gruppe > details > summary {
    list-style: none;
    cursor: pointer;
    position: relative;
    padding: 5px 24px 5px 0;
}

.ldr-choice-nav .ldr-choice-gruppe > details > summary::-webkit-details-marker {
    display: none;
}

.ldr-choice-nav .ldr-choice-gruppe > details > summary::after {
    content: "+";
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.6;
}

.ldr-choice-nav .ldr-choice-gruppe > details[open] > summary::after {
    content: "\2013";
}

.ldr-choice-nav .uk-nav-sub {
    padding: 2px 0 6px 12px;
}

.ldr-choice-leer {
    padding: 12px 15px;
    border: 1px dashed currentColor;
    opacity: 0.6;
    font-size: 0.875rem;
}

.ldr-choice-ohne-js {
    margin-top: 10px;
}

/* Pop-up mit eingebetteter Seite */
.ldr-choice-rahmen .ldr-choice-rahmen-box {
    width: var(--ldr-choice-breite, 480px);
    max-width: calc(100vw - 30px);
    padding: 0;
    overflow: hidden;
}

.ldr-choice-rahmen .ldr-choice-rahmen-frame {
    display: block;
    width: 100%;
    height: var(--ldr-choice-hoehe, 78vh);
    border: 0;
}

.ldr-choice-rahmen .ldr-choice-rahmen-zu {
    z-index: 1;
    background: rgba(255, 255, 255, 0.92);
    border-radius: 50%;
    padding: 6px;
}

@media (max-width: 639px) {
    .ldr-choice-rahmen.uk-modal {
        padding: 0;
    }

    .ldr-choice-rahmen .ldr-choice-rahmen-box {
        width: 100%;
        max-width: 100%;
        min-height: 100vh;
        margin: 0;
    }

    .ldr-choice-rahmen .ldr-choice-rahmen-frame {
        height: 100vh;
        height: 100dvh;
    }
}

/* Icon-Gestaltung (0.8.0) — Größe, Farbe, Fläche dahinter, Abstand.
   ========================================================================== */
.ldr-choice-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
    flex-shrink: 0;
}

.ldr-choice-icon--farbe {
    color: var(--ldr-choice-icon-farbe);
}

.ldr-choice-icon--kreis,
.ldr-choice-icon--quadrat {
    width: var(--ldr-choice-icon-flaeche, 2em);
    height: var(--ldr-choice-icon-flaeche, 2em);
    /* Ohne eigene Farbe: halbtransparent aus der Textfarbe — passt auf jedem Button-Stil. */
    background: var(--ldr-choice-icon-hg, color-mix(in srgb, currentColor 15%, transparent));
}

.ldr-choice-icon--kreis { border-radius: 50%; }
.ldr-choice-icon--quadrat { border-radius: 25%; }
