/* Cookie-bannern och dess inställningar. */

/* ---------- Cookie-banner ---------- */
.cc-root { position: fixed; inset: 0; z-index: 2000; pointer-events: none; font-family: Inter, system-ui, sans-serif; }
.cc-backdrop { position: absolute; inset: 0; background: rgba(15, 18, 60, .45); opacity: 0; transition: opacity .2s; }
.cc-show-settings .cc-backdrop { opacity: 1; pointer-events: auto; }
.cc-banner {
  position: absolute; left: 50%; bottom: 20px; transform: translate(-50%, 24px); opacity: 0;
  width: min(960px, calc(100% - 32px)); max-height: calc(100% - 40px); overflow-y: auto;
  background: #fff; color: #1f2340; border-radius: 18px; box-shadow: 0 18px 60px rgba(22, 20, 143, .25);
  padding: 22px 24px; pointer-events: auto; transition: transform .25s ease, opacity .25s ease;
  display: grid; grid-template-columns: 1fr auto; gap: 14px 28px; align-items: center;
}
.cc-visible .cc-banner { transform: translate(-50%, 0); opacity: 1; }
.cc-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.cc-head svg { width: 28px; height: 28px; flex: none; }
.cc-head h2 { font-family: Poppins, sans-serif; font-size: 1.08rem; margin: 0; color: var(--navy, #16148f); }
.cc-text { margin: 0; font-size: .9rem; line-height: 1.6; color: #4b5068; }
.cc-text a { color: var(--accent, #2340e0); font-weight: 600; }
.cc-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.cc-btn { font: 600 .92rem Poppins, sans-serif; border-radius: 999px; padding: 11px 20px; cursor: pointer; border: 2px solid transparent; white-space: nowrap; }
.cc-btn:focus-visible { outline: 3px solid #a99cf7; outline-offset: 2px; }
.cc-btn-primary { background: var(--navy, #16148f); color: #fff; }
.cc-btn-primary:hover { background: var(--accent, #2340e0); }
.cc-btn-outline { background: #fff; color: var(--navy, #16148f); border-color: var(--navy, #16148f); }
.cc-btn-outline:hover { background: #eef1ff; }
.cc-btn-link { background: none; color: var(--accent, #2340e0); padding-left: 6px; padding-right: 6px; text-decoration: underline; }
.cc-settings, .cc-btn[data-cc="save"] { display: none; }
.cc-show-settings .cc-banner { grid-template-columns: 1fr; width: min(620px, calc(100% - 32px)); top: 50%; bottom: auto; transform: translate(-50%, -50%); }
.cc-show-settings .cc-settings { display: block; }
.cc-show-settings .cc-btn[data-cc="save"] { display: inline-block; }
.cc-show-settings .cc-btn[data-cc="settings"] { display: none; }
.cc-show-settings .cc-actions { justify-content: stretch; }
.cc-show-settings .cc-actions .cc-btn { flex: 1 1 160px; }
.cc-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-top: 1px solid #eceef6; }
.cc-row-text { display: flex; flex-direction: column; gap: 2px; font-size: .9rem; }
.cc-row-text span { color: #5d627a; font-size: .84rem; line-height: 1.5; }
.cc-switch { position: relative; flex: none; width: 46px; height: 26px; cursor: pointer; }
.cc-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.cc-slider { position: absolute; inset: 0; background: #c9cde0; border-radius: 999px; transition: background .2s; }
.cc-slider::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.cc-switch input:checked + .cc-slider { background: #10b981; }
.cc-switch input:checked + .cc-slider::after { transform: translateX(20px); }
.cc-switch input:disabled + .cc-slider { opacity: .55; }
.cc-switch input:disabled { cursor: not-allowed; }
.cc-switch input:focus-visible + .cc-slider { outline: 3px solid #a99cf7; outline-offset: 2px; }
@media (max-width: 760px) {
  .cc-banner { grid-template-columns: 1fr; bottom: 12px; padding: 18px; width: calc(100% - 24px); }
  .cc-actions { justify-content: stretch; }
  .cc-actions .cc-btn { flex: 1 1 140px; }
  .cc-btn-link { flex-basis: 100% !important; order: 3; }
}
@media (prefers-reduced-motion: reduce) {
  .cc-banner, .cc-backdrop { transition: none; }
}
