/* Cookie consent banner + settings dialog. Calm on purpose: a small card in the corner, no page overlay,
   nothing blocked. The settings dialog is the only modal, and only when the visitor opens it.
   Accept and reject have the same size and weight, as EU regulators expect. */

.mmp-cc {
    position: fixed;
    left: 16px;
    bottom: 16px;
    z-index: 9990;
    box-sizing: border-box;
    width: min(408px, calc(100vw - 32px));
    padding: 16px 18px 12px;
    background: #fff;
    color: #1a2b27;
    border: 1px solid #e3eee9;
    border-radius: 20px;
    box-shadow: 0 24px 60px -24px rgba(16, 68, 68, .40), 0 8px 22px -12px rgba(16, 68, 68, .16);
    font: 400 14px/1.5 inherit;
    font-family: inherit;
    opacity: 0;
    transform: translateY(14px);
    transition: opacity .28s ease, transform .28s ease;
}
.mmp-cc[hidden], .mmp-cc-overlay[hidden] { display: none; }
.mmp-cc.is-visible { opacity: 1; transform: none; }

.mmp-cc-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.mmp-cc-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border-radius: 11px;
    background: #ecfdf5;
    color: #059669;
}
.mmp-cc-title { font-size: 16px; font-weight: 700; line-height: 1.25; color: #0f172a; }
.mmp-cc-text { margin: 0; font-size: 13.5px; line-height: 1.55; color: #4d6259; }
.mmp-cc-text a { color: #047857; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; }
.mmp-cc-text a:hover { color: #064e3b; }

.mmp-cc-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.mmp-cc-btn {
    box-sizing: border-box;
    min-height: 40px;
    padding: 9px 14px;
    border-radius: 12px;
    border: 1.5px solid transparent;
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .1s ease;
}
.mmp-cc-btn:active { transform: translateY(1px); }
.mmp-cc-btn--primary { background: #047857; border-color: #047857; color: #fff; }   /* 5.5:1 with white text */
.mmp-cc-btn--primary:hover { background: #065f46; border-color: #065f46; }
.mmp-cc-btn--ghost { background: #fff; border-color: #cfe0d9; color: #1a2b27; }
.mmp-cc-btn--ghost:hover { background: #f3faf7; border-color: #a9c9be; }

.mmp-cc-link {
    display: block;
    margin: 4px auto 0;
    padding: 6px 8px;
    background: none;
    border: 0;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    color: #4d6259;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}
.mmp-cc-link:hover { color: #047857; }

.mmp-cc a:focus-visible, .mmp-cc button:focus-visible, .mmp-cc-modal button:focus-visible,
.mmp-cc-modal a:focus-visible, .mmp-cc-switch input:focus-visible + .mmp-cc-track {
    outline: 2px solid #10b981;
    outline-offset: 2px;
}

/* --- Settings dialog ------------------------------------------------------------------------------ */
.mmp-cc-overlay {
    position: fixed;
    inset: 0;
    z-index: 9995;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(6, 40, 32, .48);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
}
.mmp-cc-modal {
    box-sizing: border-box;
    width: min(520px, 100%);
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    padding: 22px 22px 20px;
    background: #fff;
    border-radius: 22px;
    box-shadow: 0 30px 80px -24px rgba(6, 40, 32, .55);
    outline: none;
}
.mmp-cc-modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.mmp-cc-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 10px;
    background: #f3f6f5;
    color: #4d6259;
    cursor: pointer;
    transition: background-color .15s ease;
}
.mmp-cc-close:hover { background: #e6efeb; }

.mmp-cc-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-top: 10px;
    padding: 14px 16px;
    background: #f7fbf9;
    border: 1px solid #e3eee9;
    border-radius: 14px;
}
.mmp-cc-row-text { min-width: 0; }
.mmp-cc-row-title { font-size: 14.5px; font-weight: 700; color: #0f172a; }
.mmp-cc-row-desc { margin: 3px 0 0; font-size: 12.5px; line-height: 1.5; color: #5b7067; }
.mmp-cc-locked { flex: 0 0 auto; padding-top: 2px; font-size: 12px; font-weight: 700; color: #047857; white-space: nowrap; }

.mmp-cc-switch { position: relative; flex: 0 0 auto; display: inline-block; width: 44px; height: 26px; margin-top: 2px; cursor: pointer; }
.mmp-cc-switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.mmp-cc-track { position: absolute; inset: 0; border-radius: 999px; background: #c5d3ce; transition: background-color .2s ease; pointer-events: none; }
.mmp-cc-track::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
    transition: transform .2s ease;
}
.mmp-cc-switch input:checked + .mmp-cc-track { background: #059669; }
.mmp-cc-switch input:checked + .mmp-cc-track::after { transform: translateX(18px); }

.mmp-cc-actions--modal { margin-top: 18px; }

/* --- Phones: a slim sheet along the bottom ---------------------------------------------------------- */
@media (max-width: 560px) {
    .mmp-cc { left: 10px; right: 10px; bottom: 10px; width: auto; padding: 14px 14px 8px; border-radius: 18px; }
    .mmp-cc-icon { width: 30px; height: 30px; border-radius: 10px; }
    .mmp-cc-icon svg { width: 18px; height: 18px; }
    .mmp-cc-title { font-size: 15px; }
    .mmp-cc-text { font-size: 13px; line-height: 1.5; }
    .mmp-cc-actions { margin-top: 10px; }
    .mmp-cc-btn { min-height: 42px; }
    .mmp-cc-overlay { align-items: flex-end; padding: 0; }
    .mmp-cc-modal { width: 100%; max-height: 88vh; border-radius: 22px 22px 0 0; padding: 20px 16px 18px; }
    .mmp-cc-row { padding: 12px 14px; }
}

/* Very small phones (320-360px): drop the icon and tighten, so the banner stays out of the way. */
@media (max-width: 360px) {
    .mmp-cc { padding: 12px 12px 6px; }
    .mmp-cc-icon { display: none; }
    .mmp-cc-title { font-size: 14.5px; }
    .mmp-cc-text { font-size: 12.5px; }
    .mmp-cc-actions { gap: 8px; margin-top: 8px; }
    .mmp-cc-btn { min-height: 40px; padding: 8px 6px; font-size: 13px; }
    .mmp-cc-link { margin-top: 2px; }
}

@media (prefers-reduced-motion: reduce) {
    .mmp-cc, .mmp-cc-btn, .mmp-cc-track, .mmp-cc-track::after { transition: none; }
    .mmp-cc { transform: none; }
}
@media print { .mmp-cc, .mmp-cc-overlay { display: none !important; } }

/* "Cookie settings" button used on the Cookie Policy page (no Tailwind dependency). */
.mmp-cc-open-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 18px;
    border: 1.5px solid #059669;
    border-radius: 12px;
    background: #fff;
    color: #047857;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color .15s ease, color .15s ease;
}
.mmp-cc-open-btn:hover { background: #047857; color: #fff; }
.mmp-cc-open-btn:focus-visible { outline: 2px solid #10b981; outline-offset: 2px; }
