/* ==========================================================================
   Leipzig im – Merkliste
   ========================================================================== */

.li-detail-kopf {
    position: relative;
}

button.li-merken-button {
    display: inline-flex;
    width: auto;
    max-width: max-content;
    min-width: 0;
    min-height: 40px;
    height: auto;
    margin: 0;
    padding: 8px 12px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 1px solid #9fb3c3;
    border-radius: 7px;
    background: #ffffff;
    color: #17354f;
    font-family: 'Roboto Condensed', Arial, sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    text-transform: none;
    letter-spacing: normal;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    box-shadow: none;
}

.li-detail-kopf > button.li-merken-button {
    position: absolute;
    top: 18px;
    right: 18px;
    z-index: 4;
}

button.li-merken-button:hover,
button.li-merken-button:focus-visible,
button.li-merken-button.li-merken-button-aktiv {
    border-color: #c98718;
    background: #f2c15c;
    color: #17354f;
}

button.li-merken-button .li-merken-button-icon {
    display: block;
    width: 19px;
    height: 19px;
    min-width: 19px;
    flex: 0 0 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linejoin: round;
}

button.li-merken-button.li-merken-button-aktiv
.li-merken-button-icon {
    fill: currentColor;
}

.li-header-titel {
    order: 1;
}

.li-header-nav {
    order: 2;
}

.li-header-merkliste {
    position: relative;
    order: 3;
    display: grid;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    margin-left: 14px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 50%;
    color: #ffffff;
}

.li-header-merkliste:hover,
.li-header-merkliste:focus-visible {
    background: #ffffff;
    color: #004b8c;
}

.li-header-merkliste svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linejoin: round;
}

.li-header-merkliste-anzahl {
    position: absolute;
    top: -7px;
    right: -7px;
    display: grid;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    place-items: center;
    border: 2px solid #004b8c;
    border-radius: 999px;
    background: #f2c15c;
    color: #17354f;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1;
}

.li-header-social {
    order: 4;
}

.li-header-menuschalter {
    order: 5;
}

.li-merkliste-seite {
    width: min(1500px, calc(100% - 32px));
    margin: 20px auto 64px;
    color: #2d4656;
}

.li-merkliste-kopf {
    margin-bottom: 30px;
    padding: clamp(30px, 6vw, 52px);
    border: 1px solid #dce5ea;
    border-radius: 18px;
    background: linear-gradient(
        135deg,
        #eef5f8 0%,
        #ffffff 72%
    );
}

.li-merkliste-kicker {
    margin: 0 0 8px;
    color: #2c6b96;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.li-merkliste-kopf h1 {
    margin: 0 0 14px;
    color: #173b54;
    font-size: clamp(2rem, 5vw, 3.5rem);
    line-height: 1.08;
}

.li-merkliste-kopf > p:not(.li-merkliste-kicker) {
    max-width: 1600px;
    margin: 0;
    color: #526a79;
    font-size: 1.04rem;
    line-height: 1.68;
}

.li-merkliste-kopf .li-merkliste-hinweis {
    margin-top: 10px;
    font-size: 0.9rem;
}

.li-merkliste-status,
.li-merkliste-fehler {
    padding: 28px;
    border: 1px solid #dce5ea;
    border-radius: 14px;
    background: #f7fafb;
    color: #526a79;
}

.li-merkliste-fehler h2 {
    margin: 0 0 10px;
    color: #173b54;
}

.li-merkliste-raster {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    align-items: stretch;
}

.li-merkliste-eintrag {
    position: relative;
    min-width: 0;
}

.li-merkliste-eintrag .li-va-karte {
    height: 100%;
}

.li-merkliste-entfernen {
    position: absolute;
    right: 10px;
    bottom: 10px;
    z-index: 8;
    display: grid;
    width: 38px;
    height: 38px;
    padding: 0;
    place-items: center;
    border: 1px solid #b8c7d1;
    border-radius: 50%;
    background: #ffffff;
    color: #526a79;
    font-family: Arial, sans-serif;
    font-size: 1.55rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(18, 53, 79, 0.16);
}

.li-merkliste-entfernen:hover,
.li-merkliste-entfernen:focus-visible {
    border-color: #a51d24;
    background: #a51d24;
    color: #ffffff;
}

.li-merkliste-leer {
    padding: clamp(28px, 5vw, 46px);
    border: 1px solid #dce5ea;
    border-radius: 18px;
    background: #f7fafb;
}

.li-merkliste-leer h2 {
    margin: 0 0 12px;
    color: #173b54;
    font-size: clamp(1.65rem, 3.5vw, 2.4rem);
}

.li-merkliste-leer > p:not(.li-merkliste-kicker) {
    max-width: 700px;
    color: #526a79;
    line-height: 1.65;
}

.li-merkliste-leer-aktionen {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}

.li-merkliste-button {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    padding: 0 18px;
    border: 2px solid #1f5d87;
    border-radius: 8px;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
}

.li-merkliste-button-primaer {
    background: #1f5d87;
    color: #ffffff;
}

.li-merkliste-button-sekundaer {
    background: #ffffff;
    color: #1f5d87;
}

.li-merkliste-button:hover,
.li-merkliste-button:focus-visible {
    border-color: #c98718;
    background: #f2c15c;
    color: #173b54;
    text-decoration: none;
}

@media (max-width: 1124px) {
    .li-header-titel {
        order: 1;
    }

    .li-header-merkliste {
        order: 2;
        margin-right: 8px;
        margin-left: auto;
    }

    .li-header-menuschalter {
        order: 3;
        margin-left: 0;
    }

    .li-header-social {
        order: 4;
    }

    .li-header-nav {
        order: 5;
    }

    .li-merkliste-raster {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .li-merkliste-raster {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .li-detail-kopf > button.li-merken-button {
        position: static;
        width: auto;
        max-width: max-content;
        margin: 0 0 16px;
    }

    .li-header-merkliste {
        width: 34px;
        height: 34px;
        flex-basis: 34px;
    }

    .li-merkliste-seite {
        width: min(100% - 20px, 1500px);
    }

    .li-merkliste-kopf,
    .li-merkliste-leer {
        padding: 22px 18px;
        border-radius: 14px;
    }

    .li-merkliste-raster {
        grid-template-columns: 1fr;
    }

    .li-merkliste-leer-aktionen {
        display: grid;
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Merken-Button auf Veranstaltungskarten
   ========================================================================== */


/* --------------------------------------------------------------------------
   Kartencontainer
   -------------------------------------------------------------------------- */

.li-va-karte {
    position: relative;
}


/* --------------------------------------------------------------------------
   Merken-Button
   -------------------------------------------------------------------------- */

button.li-va-karte-merken {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 9;

    display: grid;
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
    max-width: none;
    padding: 0;

    place-items: center;

    border: 1px solid rgba(23, 53, 79, 0.28);
    border-radius: 50%;

    background: rgba(255, 255, 255, 0.94);
    color: #17354f;

    box-shadow: 0 3px 10px rgba(18, 53, 79, 0.18);

    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

button.li-va-karte-merken:hover,
button.li-va-karte-merken:focus-visible {
    transform: translateY(-1px);
    border-color: #c98718;
    background: #f2c15c;
    color: #17354f;
}

button.li-va-karte-merken.li-merken-button-aktiv {
    border-color: #c98718;
    background: #f2c15c;
    color: #17354f;
}

button.li-va-karte-merken .li-merken-button-icon {
    width: 19px;
    height: 19px;
}


/* --------------------------------------------------------------------------
   Abstand zu Kennzeichnungen
   -------------------------------------------------------------------------- */

/*
 * Die Badges beginnen links. Der Merken-Button sitzt rechts.
 * Damit sich beides auf schmalen Karten nicht überlappt, erhält
 * der Kennzeichnungsbereich rechts zusätzlichen Platz.
 */

.li-va-karte-kennzeichnungen {
    right: 56px;
}


/* --------------------------------------------------------------------------
   Karten ohne sichtbaren Bildbereich
   -------------------------------------------------------------------------- */

.li-va-karte:not(:has(.li-va-karte-bildbereich))
button.li-va-karte-merken {
    top: 10px;
    right: 10px;
}


/* ==========================================================================
   Responsive
   ========================================================================== */


/* --------------------------------------------------------------------------
   Smartphone
   -------------------------------------------------------------------------- */

@media (max-width: 680px) {

    button.li-va-karte-merken {
        top: 12px;
        right: 12px;
        width: 42px;
        height: 42px;
        min-width: 42px;
        min-height: 42px;
    }

    .li-va-karte-ohne-bild button.li-va-karte-merken {
        top: 10px;
        right: 10px;
    }

    /*
     * Bei Karten ohne Bild liegt die Rubrik oben.
     * Rechts bleibt Platz für den Merken-Button.
     */

    .li-va-karte-ohne-bild .li-va-karte-rubrik {
        padding-right: 62px;
    }
}


/* --------------------------------------------------------------------------
   Bewegungsreduktion
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
    button.li-va-karte-merken {
        transition: none;
    }
}

/* ==========================================================================
   Merkliste – Feinschliff
   ========================================================================== */


/* --------------------------------------------------------------------------
   Toast-Rückmeldung
   -------------------------------------------------------------------------- */

.li-merkliste-toast {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 9999;

    max-width: min(360px, calc(100% - 32px));
    padding: 13px 17px;

    border: 1px solid #d6b35a;
    border-radius: 9px;

    background: #fff7d8;
    color: #17354f;

    font-weight: 700;
    line-height: 1.35;

    box-shadow: 0 10px 28px rgba(18, 53, 79, 0.2);

    opacity: 0;
    transform: translateY(14px);
    pointer-events: none;

    transition:
        opacity 180ms ease,
        transform 180ms ease;
}

.li-merkliste-toast-sichtbar {
    opacity: 1;
    transform: translateY(0);
}


/* --------------------------------------------------------------------------
   Dezente Animation
   -------------------------------------------------------------------------- */

.li-merkliste-animation {
    animation: li-merkliste-klick 240ms ease;
}

@keyframes li-merkliste-klick {
    0% {
        transform: scale(1);
    }

    45% {
        transform: scale(1.12);
    }

    100% {
        transform: scale(1);
    }
}


/* --------------------------------------------------------------------------
   Karte sanft entfernen
   -------------------------------------------------------------------------- */

.li-merkliste-eintrag {
    transition:
        opacity 220ms ease,
        transform 220ms ease;
}

.li-merkliste-eintrag-entfernen {
    opacity: 0;
    transform: scale(0.96);
    pointer-events: none;
}


/* --------------------------------------------------------------------------
   Merken-Button auf der Merkliste ausblenden
   -------------------------------------------------------------------------- */

.li-merkliste-eintrag
.li-va-karte-merken {
    display: none;
}


/* --------------------------------------------------------------------------
   Mobile Toast-Position
   -------------------------------------------------------------------------- */

@media (max-width: 560px) {
    .li-merkliste-toast {
        right: 10px;
        bottom: 14px;
        left: 10px;
        max-width: none;
        text-align: center;
    }
}


/* --------------------------------------------------------------------------
   Bewegungsreduktion
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
    .li-merkliste-toast,
    .li-merkliste-eintrag {
        transition: none;
    }

    .li-merkliste-animation {
        animation: none;
    }
}

