/**
 * Lime Connect – Borlabs Cookie Bridge
 *
 * Die Farb- und Positionswerte kommen als CSS-Variablen aus der Plugin-Konfiguration
 * (siehe lime-connect-borlabs.php). Die Fallbacks hier greifen nur, falls das
 * Inline-Stylesheet nicht ausgeliefert wird.
 */

.lcb-launcher {
    position: fixed;
    bottom: var(--lcb-offset-y, 20px);
    z-index: var(--lcb-z, 999997);
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--lcb-size, 60px);
    height: var(--lcb-size, 60px);
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--lcb-accent, #0a6ed1);
    color: var(--lcb-icon, #fff);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.24);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.lcb-launcher--right {
    right: var(--lcb-offset-x, 20px);
}

.lcb-launcher--left {
    left: var(--lcb-offset-x, 20px);
}

.lcb-launcher:hover {
    transform: scale(1.06);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.lcb-launcher:focus-visible {
    outline: 3px solid var(--lcb-accent, #0a6ed1);
    outline-offset: 3px;
}

.lcb-launcher__icon {
    width: calc(var(--lcb-size, 60px) * 0.666);
    height: calc(var(--lcb-size, 60px) * 0.666);
    pointer-events: none;
}

/* Eigenes Bild aus der Mediathek */
.lcb-launcher__image {
    width: calc(var(--lcb-size, 60px) * 0.56);
    height: calc(var(--lcb-size, 60px) * 0.56);
    object-fit: contain;
    pointer-events: none;
}

/* Eigenes SVG: der Nutzer liefert das Element selbst, deshalb hier greifen. */
.lcb-launcher > svg:not(.lcb-launcher__icon) {
    width: calc(var(--lcb-size, 60px) * 0.5);
    height: calc(var(--lcb-size, 60px) * 0.5);
    pointer-events: none;
}

/* --- Dialog ------------------------------------------------------------- */

.lcb-overlay {
    position: fixed;
    inset: 0;
    z-index: calc(var(--lcb-z, 999997) + 1);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.lcb-overlay__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
}

.lcb-dialog {
    position: relative;
    box-sizing: border-box;
    width: 100%;
    max-width: 480px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    padding: 28px;
    border-radius: 10px;
    background: #fff;
    color: #1d2327;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
    font-size: 15px;
    line-height: 1.55;
}

.lcb-dialog__close {
    position: absolute;
    top: 8px;
    right: 10px;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    opacity: 0.6;
}

.lcb-dialog__close:hover {
    opacity: 1;
}

.lcb-dialog__title {
    margin: 0 0 12px;
    padding-right: 32px;
    font-size: 21px;
    line-height: 1.3;
}

.lcb-dialog__text p {
    margin: 0 0 12px;
}

.lcb-dialog__text p:last-child {
    margin-bottom: 0;
}

.lcb-dialog__links {
    margin: 16px 0 0;
    font-size: 13px;
}

.lcb-dialog__link {
    color: var(--lcb-accent, #0a6ed1);
    text-decoration: underline;
}

.lcb-dialog__link--button {
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    cursor: pointer;
}

.lcb-dialog__sep {
    margin: 0 6px;
    opacity: 0.5;
}

.lcb-dialog__error {
    margin: 16px 0 0;
    padding: 10px 12px;
    border-radius: 6px;
    background: #fcf0f1;
    color: #8a1f11;
    font-size: 14px;
}

.lcb-dialog__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 22px;
}

.lcb-btn {
    padding: 11px 18px;
    border: 1px solid transparent;
    border-radius: 6px;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.lcb-btn[disabled] {
    cursor: default;
    opacity: 0.65;
}

.lcb-btn--primary {
    background: var(--lcb-accent, #0a6ed1);
    color: var(--lcb-icon, #fff);
}

.lcb-btn--secondary {
    border-color: currentColor;
    background: none;
    color: #50575e;
}

.lcb-btn:focus-visible {
    outline: 3px solid var(--lcb-accent, #0a6ed1);
    outline-offset: 2px;
}

@media (max-width: 480px) {
    .lcb-dialog__actions {
        flex-direction: column-reverse;
    }

    .lcb-btn {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .lcb-launcher {
        transition: none;
    }

    .lcb-launcher:hover {
        transform: none;
    }
}
