/* ============================================================
   KIILERICH VINE
   REKLAMER OG POP-UP
   ============================================================ */

.reklame-popup[hidden],
.reklame-overlay[hidden] {
    display: none !important;
}

/* ============================================================
   LILLE REKLAME
   ============================================================ */

.reklame-popup {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 1000;
    width: min(390px, calc(100vw - 48px));
    padding: 8px;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: var(--color-surface);
    box-shadow: 0 12px 45px rgba(40, 25, 20, 0.25);
    opacity: 0;
    transform: translateX(calc(100% + 50px));
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.reklame-popup.is-visible {
    opacity: 1;
    transform: translateX(0);
}

.reklame-vis {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    border-radius: 7px;
    background: transparent;
    cursor: zoom-in;
    overflow: hidden;
}

.reklame-vis img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    border-radius: 7px;
}

.reklame-popup-bund {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 5px 3px;
    color: var(--color-muted);
    font-size: 12px;
    font-weight: 600;
    text-align: center;
}

.reklame-pil {
    color: var(--color-wine);
    font-size: 17px;
}

/* ============================================================
   LUKKEKNAP
   ============================================================ */

.reklame-luk {
    position: absolute;
    top: -15px;
    right: -15px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 2px solid #ffffff;
    border-radius: 50%;
    background: var(--color-wine);
    color: #ffffff;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.2);
}

.reklame-luk:hover {
    background: var(--color-wine-dark);
}

/* ============================================================
   STOR VISNING
   ============================================================ */

.reklame-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 35px;
    background: rgba(20, 12, 14, 0.88);
    overflow-y: auto;
}

.reklame-overlay-indhold {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    max-width: 100%;
    max-height: 100%;
}

.reklame-overlay-indhold img {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: calc(100dvh - 130px);
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 15px 55px rgba(0, 0, 0, 0.35);
}

.reklame-overlay-luk {
    position: fixed;
    top: 20px;
    right: 25px;
    z-index: 2001;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    background: var(--color-wine);
    color: #ffffff;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
}

.reklame-overlay-luk:hover {
    background: var(--color-wine-dark);
}

.reklame-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 6px;
    background: var(--color-wine);
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
}

.reklame-link:hover {
    background: var(--color-wine-dark);
}

/* ============================================================
   TASTATUR
   ============================================================ */

.reklame-luk:focus-visible,
.reklame-vis:focus-visible,
.reklame-overlay-luk:focus-visible,
.reklame-link:focus-visible {
    outline: 3px solid #ffffff;
    outline-offset: 3px;
}

/* ============================================================
   TABLET
   ============================================================ */

@media (max-width: 900px) {

    .reklame-popup {
        right: 20px;
        bottom: 20px;
        width: min(350px, calc(100vw - 40px));
    }
}

/* ============================================================
   MOBIL
   ============================================================ */

@media (max-width: 600px) {

    .reklame-popup {
        right: 50%;
        bottom: 16px;
        width: min(340px, calc(100vw - 36px));
        transform: translate(50%, calc(100% + 50px));
    }

    .reklame-popup.is-visible {
        transform: translate(50%, 0);
    }

    .reklame-luk {
        top: -12px;
        right: -10px;
    }

    .reklame-overlay {
        padding: 70px 12px 25px;
    }

    .reklame-overlay-indhold img {
        max-height: calc(100dvh - 155px);
    }

    .reklame-overlay-luk {
        top: 12px;
        right: 12px;
    }
}

/* ============================================================
   REDUCERET BEVÆGELSE
   ============================================================ */

@media (prefers-reduced-motion: reduce) {

    .reklame-popup {
        transition: none;
    }
}
