/* MUB nyhedsbrev-pop-up — følger temaets farver (blå #025e9c, mørk #222a28) og Montserrat */

.mub-nl {
    --mub-blue: #025e9c;
    --mub-blue-dark: #014a7c;
    --mub-dark: #222a28;
    --mub-muted: rgba(34, 42, 40, .72);
    --mub-line: #cfd4d3;
    --mub-error: #d9534f;
    --mub-gap: 24px;

    position: fixed;
    right: var(--mub-gap);
    bottom: calc(var(--mub-nl-bottom, 0px) + var(--mub-gap));
    z-index: 100000;
    width: 390px;
    max-width: calc(100vw - 2 * var(--mub-gap));
    max-height: calc(100vh - var(--mub-nl-bottom, 0px) - 2 * var(--mub-gap));
    overflow: auto;
    overscroll-behavior: contain;
    background: #fff;
    color: var(--mub-dark);
    font-family: montserrat, Avenir, "Avenir Next", "Helvetica Neue", "Segoe UI", Verdana, sans-serif;
    font-size: 15px;
    line-height: 1.45;
    text-align: left;
    box-shadow: 0 20px 50px rgba(34, 42, 40, .28), 0 2px 8px rgba(34, 42, 40, .12);
    opacity: 0;
    transform: translateY(28px);
    transition: opacity .35s ease, transform .45s cubic-bezier(.2, .8, .2, 1), bottom .3s ease;
}
.mub-nl[hidden] { display: none; }
.mub-nl.is-open { opacity: 1; transform: none; }
.mub-nl *, .mub-nl *::before, .mub-nl *::after { box-sizing: border-box; }

/* Header */
.mub-nl__head {
    position: sticky;
    top: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 12px 14px 22px;
    background: var(--mub-blue);
}
.mub-nl__logo { display: block; width: auto; height: 30px; max-width: none; }

.mub-nl .mub-nl__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #fff;
    font-size: 0;
    line-height: 1;
    text-shadow: none;
    box-shadow: none;
    cursor: pointer;
    transition: background-color .2s ease;
}
.mub-nl .mub-nl__close:hover { background: rgba(255, 255, 255, .14); }
.mub-nl .mub-nl__close:focus-visible { outline: 2px solid #fff; outline-offset: -4px; }

/* Indhold */
.mub-nl__body { padding: 20px 22px 18px; }

.mub-nl .mub-nl__title {
    margin: 0 0 6px;
    padding: 0;
    color: var(--mub-dark);
    font-family: inherit;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0;
    text-transform: none;
    text-shadow: none;
}
.mub-nl .mub-nl__intro {
    margin: 0 0 16px;
    color: var(--mub-muted);
    font-size: 14px;
}
.mub-nl .mub-nl__notice {
    margin: 0 0 16px;
    padding: 10px 12px;
    border-left: 3px solid var(--mub-blue);
    background: #e9f2f9;
    color: var(--mub-dark);
    font-size: 14px;
}
.mub-nl .mub-nl__notice[hidden] { display: none; }

/* Felter */
.mub-nl__form { margin: 0; }
.mub-nl__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 12px;
}
.mub-nl .form-group { margin: 0 0 12px; }
.mub-nl .form-group label {
    display: block;
    margin: 0 0 4px;
    color: var(--mub-dark);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.mub-nl__optional { font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--mub-muted); }

.mub-nl .form-control {
    display: block;
    width: 100%;
    height: 44px;
    margin: 0;
    padding: 0 12px;
    border: 1px solid var(--mub-line);
    border-radius: 0;
    background-color: #fff;
    color: var(--mub-dark);
    font-family: inherit;
    font-size: 16px; /* 16px undgår zoom på iPhone */
    line-height: normal;
    box-shadow: none;
    transition: border-color .2s ease, box-shadow .2s ease;
    -webkit-appearance: none;
    appearance: none;
}
.mub-nl .form-control::placeholder { color: #8a9290; opacity: 1; }
.mub-nl select.form-control {
    padding-right: 34px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23222a28' stroke-width='1.8'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    cursor: pointer;
}
.mub-nl select.form-control:invalid { color: #8a9290; }
.mub-nl select.form-control option { color: var(--mub-dark); }
.mub-nl .form-control:focus {
    border-color: var(--mub-blue);
    box-shadow: 0 0 0 3px rgba(2, 94, 156, .18);
    outline: none;
}
.mub-nl .form-control:user-invalid { border-color: var(--mub-error); }

/* Betingelser */
.mub-nl .terms { margin: 4px 0 16px; }
.mub-nl .terms label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0;
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
}
.mub-nl .terms input {
    flex: none;
    width: 18px;
    height: 18px;
    margin: 1px 0 0;
    accent-color: var(--mub-blue);
    cursor: pointer;
}
.mub-nl .terms a { color: var(--mub-blue); text-decoration: underline; }

/* Knap */
.mub-nl .mub-nl__submit {
    display: block;
    width: 100%;
    height: 48px;
    margin: 0;
    padding: 0 20px;
    border: 0;
    border-radius: 0;
    background: var(--mub-blue);
    color: #fff;
    font-family: inherit;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: .02em;
    line-height: 1;
    text-shadow: none;
    box-shadow: none;
    cursor: pointer;
    transition: background-color .2s ease;
}
.mub-nl .mub-nl__submit:hover { background: var(--mub-dark); }
.mub-nl .mub-nl__submit:focus-visible { outline: 3px solid rgba(2, 94, 156, .35); outline-offset: 2px; }

.mub-nl .mub-nl__fineprint {
    margin: 10px 0 0;
    color: var(--mub-muted);
    font-size: 12px;
    text-align: center;
}

/* Mobil */
@media (max-width: 480px) {
    .mub-nl { --mub-gap: 12px; width: auto; left: var(--mub-gap); max-width: none; }
    .mub-nl__body { padding: 18px 18px 16px; }
}
@media (max-width: 359px) {
    .mub-nl__row { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    .mub-nl { transition: none; transform: none; }
}
@media print {
    .mub-nl { display: none !important; }
}
