/*
 * Puffar (nudge.php): ett ljust kort nere till höger, på mobil längst ner med 12 px marginal.
 * Ingen bakgrund som mörkar sidan och ingen fokusfälla: sidan går att använda som vanligt.
 * Samma former som [salming_newsletter] (44 px höjd, 10 px hörn, versal knapp).
 * Under headern (9990) och menyn, över sidans innehåll.
 */
.salming-nudge {
    --nudge-lift: 0px;
    position: fixed;
    right: clamp(12px, 2.4vw, 32px);
    bottom: calc(clamp(12px, 2.4vw, 32px) + var(--nudge-lift) + env(safe-area-inset-bottom, 0px));
    z-index: 9980;
    box-sizing: border-box;
    width: min(380px, calc(100vw - 24px));
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    padding: 28px 28px 26px;
    background: #ffffff;
    color: #0a0a0a;
    border: 1px solid #e4e3df;
    border-radius: 14px;
    box-shadow: 0 18px 48px rgba(10, 10, 10, 0.18), 0 2px 8px rgba(10, 10, 10, 0.08);
    font-family: 'TWKLausanne', system-ui, -apple-system, "Segoe UI", sans-serif;
    font-weight: 400;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity .35s ease-out, transform .35s ease-out;
}
.salming-nudge[hidden] { display: none !important; }
.salming-nudge.is-in { opacity: 1; transform: none; }

/* Stäng: en synlig rund knapp, 40 px, med 44 px tryckyta. */
body .salming-nudge__close {
    position: absolute; top: 12px; right: 12px; z-index: 1;
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; margin: 0; padding: 0;
    background: #efeeea; border: 0; border-radius: 999px; box-shadow: none;
    color: #0a0a0a; cursor: pointer;
    transition: background-color .2s;
}
body .salming-nudge__close::after { content: ""; position: absolute; inset: -2px; }
body .salming-nudge__close:focus-visible { outline: 2px solid #0a0a0a; outline-offset: -2px; }

body .salming-nudge__eyebrow {
    margin: 0 0 12px;
    font-size: 11px; line-height: 1.4; letter-spacing: 0.2em; text-transform: uppercase; color: #5f5e5a;
}
body .salming-nudge__title {
    margin: 0 36px 10px 0;
    font-family: inherit; font-weight: 200; font-size: 26px; line-height: 1.15; letter-spacing: -0.005em; color: #0a0a0a;
}
body .salming-nudge__text {
    margin: 0 0 20px;
    font-size: 15px; line-height: 1.5; color: #3d3c39;
}

/* Nyhetsbrevet: etiketten finns i rubriken, fältet och knappen staplas i den smala rutan. */
.salming-nudge .salming-signup { max-width: none; }
.salming-nudge .salming-signup__label {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.salming-nudge .salming-signup__row { flex-direction: column; }
body .salming-nudge .salming-signup .salming-signup__row .salming-signup__btn { width: 100%; }
body .salming-nudge .salming-signup__done { font-size: 16px; }

/* Hjälpen: telefon och e-post som rader, sedan två knappar. */
.salming-nudge__list { list-style: none; margin: 0 0 20px; padding: 0; border-top: 1px solid #e4e3df; }
.salming-nudge__list li {
    display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
    padding: 12px 0; border-bottom: 1px solid #e4e3df;
}
.salming-nudge__label { font-size: 11px; line-height: 1.4; letter-spacing: 0.16em; text-transform: uppercase; color: #5f5e5a; white-space: nowrap; }
body .salming-nudge__list a {
    color: #0a0a0a; font-size: 16px; line-height: 1.3; text-decoration: none;
    border-bottom: 1px solid #8a8984; overflow-wrap: anywhere; text-align: right;
}
body .salming-nudge__list a:focus-visible { outline: 2px solid #0a0a0a; outline-offset: 3px; }

.salming-nudge__buttons { display: grid; gap: 10px; }
body .salming-nudge__btn {
    display: flex; align-items: center; justify-content: center;
    min-height: 44px; padding: 0 22px; box-sizing: border-box;
    background: #0a0a0a; color: #ffffff; border: 1px solid #0a0a0a; border-radius: 10px;
    font-size: 11px; line-height: 1; letter-spacing: 0.18em; text-transform: uppercase; text-decoration: none;
    transition: background-color .2s, color .2s;
}
.salming-nudge__btn[hidden] { display: none !important; }
body .salming-nudge__btn--ghost { background: transparent; color: #0a0a0a; }
body .salming-nudge__btn:focus-visible { outline: 2px solid #0a0a0a; outline-offset: 2px; }

/* Hover bara med mus: på pekskärm fastnar den efter ett tryck. */
@media (hover: hover) {
    body .salming-nudge__close:hover { background: #e0dfda; }
    body .salming-nudge__list a:hover { border-bottom-color: #0a0a0a; }
    body .salming-nudge__btn:hover { background: transparent; color: #0a0a0a; }
    body .salming-nudge__btn--ghost:hover { background: #0a0a0a; color: #ffffff; }
}

/* Baren finns bara på mobil (nedan). */
body .salming-nudge__bar { display: none; }

@media (pointer: coarse) {
    .salming-nudge__list li { padding: 14px 0; }
}

@media (max-width: 480px) {
    .salming-nudge { padding: 22px 20px 20px; border-radius: 12px; max-height: calc(100vh - 96px); }
    body .salming-nudge__title { font-size: 22px; }
    body .salming-nudge__text { font-size: 14px; margin-bottom: 16px; }
    body .salming-nudge__eyebrow { display: none; }
    .salming-nudge__list { margin-bottom: 16px; }
    .salming-nudge__list li { padding: 10px 0; }
}

/* Hjälpen på mobil: en låg bar med rubriken och en pil; ett tryck fäller ut resten. */
@media (max-width: 640px) {
    .salming-nudge--help { padding: 0; overflow: hidden auto; }
    .salming-nudge--help .salming-nudge__close { top: 8px; right: 8px; }
    body .salming-nudge--help .salming-nudge__bar {
        display: flex; align-items: center; gap: 10px;
        width: 100%; min-height: 56px; margin: 0; padding: 0 60px 0 20px; box-sizing: border-box;
        background: none; border: 0; border-radius: 0; box-shadow: none;
        color: #0a0a0a; font-family: inherit; font-weight: 400; font-size: 16px; line-height: 1.2;
        letter-spacing: 0; text-transform: none; text-align: left; cursor: pointer;
    }
    .salming-nudge--help .salming-nudge__bar span { flex: 1 1 auto; }
    .salming-nudge--help .salming-nudge__bar svg { flex: none; transition: transform .25s ease; }
    .salming-nudge--help.is-open .salming-nudge__bar svg { transform: rotate(180deg); }
    body .salming-nudge--help .salming-nudge__bar:focus-visible { outline: 2px solid #0a0a0a; outline-offset: -4px; }
    .salming-nudge--help .salming-nudge__body { padding: 0 20px 20px; }
    .salming-nudge--help:not(.is-open) .salming-nudge__body { display: none; }
    .salming-nudge--help .salming-nudge__eyebrow,
    .salming-nudge--help .salming-nudge__title { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .salming-nudge { transform: none; transition: opacity .2s linear; }
}

@media print { .salming-nudge { display: none !important; } }
