/* Cookie consent: an inset white bar along the bottom and a preferences dialog
   with switches. Reject and accept carry equal weight, as data protection
   guidance expects. */
.zn-consent { position: fixed; left: 20px; right: 20px; bottom: 20px; z-index: 99990; display: flex; justify-content: center; pointer-events: none; }
.zn-consent[hidden], .zn-prefs[hidden] { display: none; }
.zn-consent__bar {
    display: flex; align-items: center; gap: 32px;
    width: 100%; max-width: 1170px;
    padding: 24px 28px;
    border: 1px solid var(--border);
    border-left: 4px solid var(--primary);
    border-radius: 8px;
    background: var(--white);
    box-shadow: 0 20px 50px rgba(1, 28, 41, 0.18);
    pointer-events: auto;
    animation: znConsentIn 0.45s var(--ease);
}
@keyframes znConsentIn { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
.zn-consent__text { flex: 1; }
.zn-consent__title { margin: 0 0 4px; font-size: 18px; font-weight: 600; }
.zn-consent__text p { margin: 0; font-size: 15px; line-height: 1.6; }
.zn-consent__text a, .zn-prefs a { color: var(--secondary); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.zn-consent__text a:hover, .zn-prefs a:hover { color: var(--primary); }
.zn-consent__actions { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.zn-consent__link { padding: 0 8px; border: 0; background: none; color: var(--secondary); font: 600 15px var(--font); text-decoration: underline; text-underline-offset: 3px; }
.zn-consent__link:hover { color: var(--primary); }
.zn-consent__btn { min-width: 132px; padding: 12px 22px; border: 2px solid var(--primary); background: var(--primary); color: var(--white); font: 600 15px var(--font); transition: background-color 0.3s var(--ease), border-color 0.3s var(--ease), color 0.3s var(--ease); }
.zn-consent__btn:hover { border-color: var(--secondary); background: var(--secondary); }
.zn-consent__btn--outline { border-color: var(--secondary); background: transparent; color: var(--secondary); }
.zn-consent__btn--outline:hover { color: var(--white); }

/* Preferences dialog */
.zn-prefs { position: fixed; inset: 0; z-index: 99995; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(1, 28, 41, 0.55); }
.zn-prefs-open { overflow: hidden; }
.zn-prefs__box { width: 100%; max-width: 560px; max-height: calc(100vh - 40px); overflow-y: auto; border-radius: 8px; background: var(--white); box-shadow: 0 30px 70px rgba(1, 28, 41, 0.3); animation: znConsentIn 0.3s var(--ease); }
.zn-prefs__head { display: flex; align-items: center; justify-content: space-between; padding: 24px 28px 0; }
.zn-prefs__head h2 { margin: 0; font-size: 24px; }
.zn-prefs__close { width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; border: 0; border-radius: 50%; background: var(--surface); color: var(--secondary); font-size: 20px; }
.zn-prefs__close:hover { background: var(--secondary); color: var(--white); }
.zn-prefs__intro { margin: 12px 28px 8px; font-size: 15px; line-height: 1.6; }
.zn-prefs__item { display: flex; align-items: center; gap: 24px; margin: 0 28px; padding: 20px 0; border-top: 1px solid var(--border); }
.zn-prefs__item > div { flex: 1; }
.zn-prefs__item h3 { margin: 0 0 4px; font-size: 17px; font-weight: 600; }
.zn-prefs__item p { margin: 0; font-size: 14px; line-height: 1.55; }
.zn-prefs__always { color: var(--primary); font-size: 14px; font-weight: 600; white-space: nowrap; }
.zn-prefs__foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 20px 28px 26px; border-top: 1px solid var(--border); background: var(--surface); }
.zn-prefs__foot > div { display: flex; gap: 10px; flex-wrap: wrap; }

/* Switch */
.zn-switch { position: relative; display: inline-flex; flex-shrink: 0; cursor: pointer; }
.zn-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.zn-switch__track { width: 50px; height: 28px; border-radius: 14px; background: #c5ced4; transition: background-color 0.25s var(--ease); }
.zn-switch__track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--white); box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); transition: transform 0.25s var(--ease); }
.zn-switch input:checked + .zn-switch__track { background: var(--primary); }
.zn-switch input:checked + .zn-switch__track::after { transform: translateX(22px); }
.zn-switch input:focus-visible + .zn-switch__track { outline: 2px solid var(--secondary); outline-offset: 2px; }

@media (max-width: 991px) {
    .zn-consent__bar { flex-direction: column; align-items: stretch; gap: 18px; }
    .zn-consent__actions { flex-wrap: wrap; }
    .zn-consent__btn { flex: 1; }
    .zn-consent__link { order: 3; width: 100%; padding: 4px 0; }
}
@media (max-width: 575px) {
    .zn-consent { left: 12px; right: 12px; bottom: 12px; }
    .zn-consent__bar { padding: 20px; }
    .zn-prefs__foot > div, .zn-prefs__foot .zn-consent__btn { width: 100%; }
}
