/* ===== Cookie consent – CardioPrima ===== */
.cc-banner, .cc-modal { font-family: var(--font, "Onest", system-ui, sans-serif); color: var(--text, #3B3B3B); }
.cc-banner[hidden], .cc-modal[hidden] { display: none !important; }

/* ---- Banner ---- */
.cc-banner {
    position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 1060;
    max-width: 1180px; margin: 0 auto;
    background: #fff; border-radius: 18px;
    border: 1px solid var(--line, #ececec);
    box-shadow: 0 18px 50px rgba(15, 61, 76, .18);
    overflow: hidden;
    animation: ccSlideUp .45s cubic-bezier(.2, .8, .2, 1) both;
}
.cc-banner::before {
    content: ""; position: absolute; inset: 0 0 auto 0; height: 4px;
    background: linear-gradient(90deg, var(--accent, #D53834), #0F3D4C);
}
.cc-banner.is-leaving { animation: ccSlideDown .3s ease forwards; }
.cc-banner__inner { display: flex; align-items: center; gap: 22px; padding: 26px 28px 24px; }
.cc-banner__icon {
    flex: 0 0 52px; width: 52px; height: 52px; border-radius: 14px;
    display: grid; place-items: center;
    background: rgba(213, 56, 52, .08); color: var(--accent, #D53834);
}
.cc-banner__content { flex: 1 1 auto; min-width: 0; }
.cc-banner__title { margin: 0 0 6px; font-size: 17px; font-weight: 700; color: #0F3D4C; }
.cc-banner__text { margin: 0; font-size: 13.5px; line-height: 1.65; color: var(--muted, #6b6b6b); max-width: 720px; }
.cc-link { color: var(--accent, #D53834); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.cc-link:hover { color: #b02a26; }
.cc-banner__actions { flex: 0 0 auto; display: flex; gap: 10px; }

/* ---- Buttons ---- */
.cc-btn {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 48px; padding: 0 20px; border-radius: 12px;
    font: inherit; font-size: 14px; font-weight: 700; line-height: 1.2;
    cursor: pointer; white-space: nowrap;
    transition: background-color .2s, border-color .2s, color .2s, transform .15s, box-shadow .2s;
}
.cc-btn:active { transform: translateY(1px); }
.cc-btn:focus-visible { outline: 3px solid rgba(213, 56, 52, .35); outline-offset: 2px; }
.cc-btn--ghost { background: #fff; color: #0F3D4C; border: 1.5px solid #d5dde0; }
.cc-btn--ghost:hover { border-color: #0F3D4C; background: #f5f8f9; }
.cc-btn--primary { background: var(--accent, #D53834); color: #fff; border: 1.5px solid var(--accent, #D53834); }
.cc-btn--primary:hover { background: #bf2f2b; border-color: #bf2f2b; box-shadow: 0 8px 20px rgba(213, 56, 52, .28); }

/* ---- Modal ---- */
.cc-modal { position: fixed; inset: 0; z-index: 1070; display: flex; align-items: center; justify-content: center; padding: 16px; }
.cc-modal__backdrop { position: absolute; inset: 0; background: rgba(15, 30, 38, .55); backdrop-filter: blur(3px); animation: ccFade .25s ease both; }
.cc-modal__dialog {
    position: relative; width: 100%; max-width: 620px; max-height: calc(100vh - 32px); overflow-y: auto;
    background: #fff; border-radius: 20px; padding: 34px 30px 26px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .25);
    animation: ccPop .3s cubic-bezier(.2, .8, .2, 1) both;
}
.cc-modal__dialog::before {
    content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; border-radius: 20px 20px 0 0;
    background: linear-gradient(90deg, var(--accent, #D53834), #0F3D4C);
}
.cc-modal__close {
    position: absolute; top: 14px; right: 14px; width: 38px; height: 38px; border-radius: 10px;
    border: 0; background: #f2f4f5; color: #0F3D4C; font-size: 24px; line-height: 1; cursor: pointer; transition: background .2s;
}
.cc-modal__close:hover { background: #e4e9eb; }
.cc-modal__title { margin: 0 44px 8px 0; font-size: 21px; font-weight: 700; color: #0F3D4C; line-height: 1.3; }
.cc-modal__text { margin: 0 0 22px; font-size: 14px; line-height: 1.6; color: var(--muted, #6b6b6b); }

.cc-cats { display: flex; flex-direction: column; gap: 12px; }
.cc-cat {
    display: flex; align-items: center; justify-content: space-between; gap: 18px;
    padding: 16px 18px; margin: 0; border: 1px solid #e6eaec; border-radius: 14px; background: #fff;
    transition: border-color .2s, background .2s;
}
label.cc-cat { cursor: pointer; }
label.cc-cat:hover { border-color: #cfd8db; background: #fafbfc; }
.cc-cat__body { display: flex; flex-direction: column; min-width: 0; }
.cc-cat__title { display: block; margin: 0 0 4px; font-size: 15px; font-weight: 700; color: #0F3D4C; }
.cc-cat__text { display: block; margin: 0; font-size: 13px; line-height: 1.55; color: var(--muted, #6b6b6b); }
.cc-badge {
    flex: 0 0 auto; padding: 6px 10px; border-radius: 999px;
    background: #e8f5ec; color: #23863f; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap;
}

/* ---- Switch ---- */
.cc-switch { position: relative; flex: 0 0 50px; width: 50px; height: 28px; }
.cc-switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.cc-switch__track { position: absolute; inset: 0; border-radius: 28px; background: #cfd6d9; transition: background .2s; }
.cc-switch__track::after {
    content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%;
    background: #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, .2); transition: transform .2s cubic-bezier(.2, .8, .2, 1);
}
.cc-switch input:checked + .cc-switch__track { background: var(--accent, #D53834); }
.cc-switch input:checked + .cc-switch__track::after { transform: translateX(22px); }
.cc-switch input:focus-visible + .cc-switch__track { outline: 3px solid rgba(213, 56, 52, .35); outline-offset: 2px; }

.cc-modal__actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }

body.cc-lock { overflow: hidden; }

/* ---- Animations ---- */
@keyframes ccSlideUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: none; } }
@keyframes ccSlideDown { to { opacity: 0; transform: translateY(30px); } }
@keyframes ccFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes ccPop { from { opacity: 0; transform: translateY(16px) scale(.97); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .cc-banner, .cc-modal__dialog, .cc-modal__backdrop { animation: none !important; } }

/* ---- Responsive ---- */
@media (max-width: 1100px) {
    .cc-banner__inner { flex-wrap: wrap; }
    .cc-banner__content { flex: 1 1 calc(100% - 80px); }
    .cc-banner__actions { flex: 1 1 100%; justify-content: flex-end; }
}
@media (max-width: 640px) {
    .cc-banner { left: 10px; right: 10px; bottom: 10px; }
    .cc-banner__inner { padding: 22px 18px 18px; gap: 14px; }
    .cc-banner__icon { display: none; }
    .cc-banner__content { flex-basis: 100%; }
    .cc-banner__actions { flex-direction: column-reverse; }
    .cc-btn { width: 100%; }
    .cc-modal__dialog { padding: 28px 18px 18px; border-radius: 18px; }
    .cc-modal__title { font-size: 18px; }
    .cc-cat { padding: 14px; align-items: flex-start; }
    .cc-cat:first-child { flex-direction: column; gap: 10px; }
    .cc-modal__actions { flex-direction: column-reverse; }
}
