/* ---------- Sīkdatņu piekrišana (templates/html/cookie_consent.htm.inc, jvs/cookie-consent.js) ----------
   Pārņemts no senet.lv (2026-10-22), krāsas - ous.lv zīmols (#009ed5 / #004a61).
   Tokeni tikai šīm komponentēm, lai neietekmētu pārējo lapu. Kontrasts WCAG 2.1 AA:
   #00749c uz balta 5.2:1, #004a61 uz balta 9.9:1. */
.cc-banner, .cc-modal {
    --cc-surface: #ffffff;
    --cc-text: #1b2a33;
    --cc-text-2: #34444e;
    --cc-muted: #5a6a74;
    --cc-border: #d6e3ea;
    --cc-brand: #00749c;
    --cc-brand-dark: #004a61;
    --cc-brand-soft: #e3f4fb;
    --cc-focus: #009ed5;
    --cc-ease: cubic-bezier(.2, .7, .2, 1);
    font-family: 'Humanist 777 TL', Arial, Helvetica, sans-serif;
    box-sizing: border-box;
}
.cc-banner *, .cc-modal * { box-sizing: border-box; }
.cc-banner[hidden], .cc-modal[hidden] { display: none !important; }

.cc-banner {
    position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 10000; max-width: 980px; margin: 0 auto;
    background: var(--cc-surface); color: var(--cc-text-2); border: 1px solid var(--cc-border); border-top: 4px solid #009ed5;
    border-radius: 6px; box-shadow: 0 12px 40px rgba(0, 40, 60, .22);
    animation: cc-in .35s var(--cc-ease);
}
.cc-banner-inner { display: flex; align-items: center; gap: 20px; padding: 20px 22px; }
.cc-icon { display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; flex-shrink: 0; border-radius: 50%; background: var(--cc-brand-soft); color: var(--cc-brand-dark); }
.cc-icon svg { width: 26px; height: 26px; }
.cc-banner-text { flex: 1; min-width: 0; }
.cc-banner .cc-title, .cc-modal .cc-title { font-size: 18px; font-weight: bold; line-height: 1.3; margin: 0 0 4px; padding: 0; color: var(--cc-text); text-transform: none; border: 0; background: none; }
.cc-banner-text p { margin: 0; font-size: 14px; line-height: 1.55; }
.cc-banner a, .cc-modal a { color: var(--cc-brand); text-decoration: underline; }
.cc-banner a:hover, .cc-modal a:hover { color: var(--cc-brand-dark); }
.cc-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
body.has-cookie-notice { padding-bottom: 150px; }
@keyframes cc-in { from { opacity: 0; transform: translateY(16px); } }

/* Pogas - savas, jo ous.lv vecajam dizainam nav pogu sistēmas */
.cc-btn {
    display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 8px 16px;
    font: inherit; font-size: 14px; font-weight: bold; line-height: 1.2; white-space: nowrap; cursor: pointer;
    border-radius: 4px; border: 2px solid var(--cc-brand); transition: background .15s, color .15s, border-color .15s;
}
.cc-btn-primary { background: var(--cc-brand); color: #fff; }
.cc-btn-primary:hover { background: var(--cc-brand-dark); border-color: var(--cc-brand-dark); }
.cc-btn-ghost { background: #fff; color: var(--cc-brand-dark); }
.cc-btn-ghost:hover { background: var(--cc-brand-soft); }
.cc-btn:focus-visible, .cc-close:focus-visible, .cc-banner a:focus-visible, .cc-modal a:focus-visible { outline: 3px solid var(--cc-focus); outline-offset: 2px; }

@media (max-width: 860px) {
    .cc-banner-inner { flex-wrap: wrap; }
    .cc-actions { width: 100%; }
    .cc-actions .cc-btn { flex: 1; }
}
@media (max-width: 560px) {
    .cc-banner { left: 10px; right: 10px; bottom: 10px; }
    .cc-banner-inner { padding: 16px; gap: 12px; }
    .cc-icon { display: none; }
    .cc-actions { flex-wrap: wrap; }
    .cc-actions .cc-customize { order: 3; flex-basis: 100%; }
    body.has-cookie-notice { padding-bottom: 260px; }
}

/* Iestatījumu logs */
.cc-modal { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 10001; display: flex; align-items: center; justify-content: center; padding: 16px; }
.cc-backdrop { position: absolute; top: 0; right: 0; bottom: 0; left: 0; background: rgba(0, 30, 45, .55); }
.cc-dialog {
    position: relative; width: 100%; max-width: 560px; max-height: calc(100vh - 32px); display: flex; flex-direction: column;
    background: var(--cc-surface); color: var(--cc-text-2); border-radius: 6px; box-shadow: 0 20px 60px rgba(0, 30, 45, .35);
    animation: cc-in .25s var(--cc-ease);
}
.cc-dialog:focus { outline: none; }
.cc-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 22px 12px; }
.cc-modal .cc-dialog-head .cc-title { font-size: 22px; margin: 0; }
.cc-close { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 4px; background: transparent; color: var(--cc-text); cursor: pointer; }
.cc-close:hover { background: var(--cc-brand-soft); }
.cc-close svg { width: 18px; height: 18px; }
.cc-dialog-body { padding: 0 22px 8px; overflow-y: auto; }
.cc-intro { font-size: 14px; line-height: 1.55; margin: 0 0 12px; }
.cc-category { padding: 16px 0; border-top: 1px solid var(--cc-border); }
.cc-category-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 6px; }
.cc-category-title { font-size: 15px; font-weight: bold; color: var(--cc-text); cursor: pointer; }
.cc-category-text { margin: 0; font-size: 13px; line-height: 1.5; color: var(--cc-muted); }
.cc-always { font-size: 12px; font-weight: bold; color: #2c6b12; background: #e8f5df; padding: 4px 10px; border-radius: 4px; }
.cc-dialog-foot { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; padding: 16px 22px 20px; border-top: 1px solid var(--cc-border); }
@media (max-width: 520px) { .cc-dialog-foot .cc-btn { flex: 1 1 100%; } }
html.cc-modal-open { overflow: hidden; }

/* Slēdzis */
.cc-switch { position: relative; display: inline-block; width: 46px; height: 26px; flex-shrink: 0; }
.cc-switch input { position: absolute; top: 0; left: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.cc-switch-track { position: absolute; top: 0; right: 0; bottom: 0; left: 0; border-radius: 13px; background: #a9b8c1; transition: background .2s; }
.cc-switch-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 var(--cc-ease); }
.cc-switch input:checked + .cc-switch-track { background: var(--cc-brand); }
.cc-switch input:checked + .cc-switch-track:after { transform: translateX(20px); }
.cc-switch input:focus-visible + .cc-switch-track { outline: 3px solid var(--cc-focus); outline-offset: 3px; }

/* Saite kājenē */
.footer-cookie-link { display: inline-block; margin-top: 6px; color: inherit; text-decoration: underline; }

@media (prefers-reduced-motion: reduce) {
    .cc-banner, .cc-dialog { animation: none; }
    .cc-switch-track, .cc-switch-track:after, .cc-btn { transition: none; }
}
@media print { .cc-banner, .cc-modal { display: none !important; } }
