/**
 * Collectie-melding – pop-up en balk (inc/collectie-melding.php).
 * Kleurtokens (--imb-*) staan in css/navbar-v3.css.
 *
 * @package understrap
 */

/* ---------------------------------------------------------------- balk */

.imb-cm-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1020; /* onder de navbar (1030) en de pop-up */
    background: var(--imb-paper);
    border-top: 1px solid var(--imb-line);
    box-shadow: 0 -8px 24px rgba(31, 29, 26, 0.08);
    color: var(--imb-ink);
    padding-bottom: env(safe-area-inset-bottom);
}

.imb-cm-bar[hidden] {
    display: none;
}

.imb-cm-bar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 38px;
    padding-top: 6px;
    padding-bottom: 6px;
}

.imb-cm-bar-text {
    margin: 0;
    font-family: var(--imb-body);
    font-size: 0.95rem;
    line-height: 1.35;
    text-align: left;
    color: var(--imb-ink);
}

.imb-cm-bar-text a {
    color: var(--imb-ink);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.imb-cm-bar-text a:hover {
    color: var(--imb-accent);
}

.imb-cm-bar-close {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 50%;
    background: none;
    color: var(--imb-ink-soft);
    cursor: pointer;
}

.imb-cm-bar-close:hover,
.imb-cm-bar-close:focus-visible {
    background: var(--imb-ink);
    color: #fff;
}

/* ---------------------------------------------------------------- pop-up */

.imb-cm-dialog {
    width: min(520px, calc(100vw - 32px));
    max-width: none;
    padding: 0;
    border: 0;
    border-radius: 14px;
    background: #fff;
    color: var(--imb-ink);
    box-shadow: 0 24px 60px rgba(31, 29, 26, 0.25);
}

/* theme.css zet dialog { display: block }; een gesloten pop-up moet weg */
.imb-cm-dialog:not([open]) {
    display: none;
}

.imb-cm-dialog::backdrop {
    background: rgba(31, 29, 26, 0.45);
}

.imb-cm-dialog[open] {
    animation: imb-cm-in 0.28s cubic-bezier(0.2, 0.7, 0.2, 1);
}

@keyframes imb-cm-in {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: none; }
}

.imb-cm-card {
    padding: 32px 32px 28px;
    border-top: 6px solid var(--imb-yellow-soft);
    text-align: left;
}

.imb-cm-title {
    margin: 0 0 12px;
    font-family: var(--imb-head);
    font-weight: 400;
    font-size: 2rem;
    line-height: 1.05;
    color: var(--imb-ink);
}

.imb-cm-text {
    margin: 0 0 24px;
    font-family: var(--imb-body);
    font-size: 1.08rem;
    line-height: 1.6;
    text-align: left;
    color: var(--imb-ink-soft);
}

.imb-cm-text a {
    color: var(--imb-ink);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.imb-cm-text a:hover {
    color: var(--imb-accent);
}

.imb-cm-ok {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 13px 28px;
    border: 0;
    border-radius: 999px;
    background: var(--imb-accent);
    color: #fff;
    font-family: var(--imb-head);
    font-size: 1.05rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.18s ease, transform 0.12s ease;
}

.imb-cm-ok:hover,
.imb-cm-ok:focus-visible {
    background: var(--imb-accent-dark);
}

.imb-cm-ok:focus-visible {
    outline: 2px solid var(--imb-ink);
    outline-offset: 3px;
}

.imb-cm-ok:active {
    transform: scale(0.97);
}

@media (max-width: 575px) {
    .imb-cm-card {
        padding: 26px 22px 22px;
    }

    .imb-cm-title {
        font-size: 1.7rem;
    }

    .imb-cm-bar-text {
        font-size: 0.88rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .imb-cm-dialog[open] {
        animation: none;
    }
}
