/* AVRY Consent – banner och inställningar. Färger via CSS-variabler (sätts i inställningarna). */
.ac, .ac *, .ac-fab { box-sizing: border-box; }
.ac[hidden], .ac [hidden], .ac-fab[hidden] { display: none !important; }
.ac {
  --ac-shadow: 0 18px 50px rgba(0,0,0,.18);
  position: fixed; z-index: 2147483000; font-family: inherit; font-size: 15px; line-height: 1.5; color: var(--ac-text, #1c1a17);
}
.ac--bar { left: 0; right: 0; bottom: 0; }
.ac--box { left: 20px; bottom: 20px; max-width: 420px; }
.ac--center { inset: 0; display: grid; place-items: center; background: rgba(0,0,0,.35); padding: 16px; }
.ac--center:not(.is-visible):not(.has-modal) { display: none; }
.ac-banner {
  background: var(--ac-bg, #fff); color: var(--ac-text, #1c1a17); box-shadow: var(--ac-shadow);
  display: flex; gap: 20px 32px; align-items: center; padding: 20px 24px; outline: none;
}
.ac--bar .ac-banner { border-top: 1px solid rgba(0,0,0,.08); justify-content: center; }
.ac--bar .ac-banner__text { max-width: 760px; }
.ac--box .ac-banner, .ac--center .ac-banner { flex-direction: column; align-items: stretch; border-radius: var(--ac-radius, 10px); max-width: 520px; }
.ac-banner__title { font-weight: 600; font-size: 1.02em; margin: 0 0 4px !important; color: inherit; }
.ac-banner__body { margin: 0 !important; font-size: .9em; color: inherit; opacity: .88; }
.ac-link { color: inherit !important; text-decoration: underline !important; text-underline-offset: 2px; white-space: nowrap; }
.ac-banner__actions, .ac-modal__foot { display: flex; gap: 10px; flex-wrap: wrap; flex: 0 0 auto; }
.ac-btn {
  appearance: none; -webkit-appearance: none; cursor: pointer; font: inherit; font-size: .84em !important; font-weight: 600; letter-spacing: .02em;
  padding: 11px 20px !important; margin: 0 !important; border-radius: calc(var(--ac-radius, 10px) * .6) !important; min-width: 140px; line-height: 1.2 !important;
  border: 1.5px solid var(--ac-btn, #1c1a17) !important; transition: filter .15s, background .15s; text-transform: none !important; box-shadow: none !important; height: auto !important;
}
.ac-btn--primary { background: var(--ac-btn, #1c1a17) !important; color: var(--ac-btn-text, #fff) !important; }
.ac-btn--primary:hover { filter: brightness(1.15); }
.ac-btn--ghost { background: transparent !important; color: var(--ac-text, #1c1a17) !important; }
.ac-btn--ghost:hover { background: rgba(0,0,0,.05) !important; }
.ac-btn:focus-visible, .ac-x:focus-visible, .ac-fab:focus-visible, .ac-switch input:focus-visible + .ac-switch__ui, .ac-cat__cookies summary:focus-visible { outline: 3px solid var(--ac-accent, #b0996f); outline-offset: 2px; }

/* Inställningsdialog */
.ac-modal { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: grid; place-items: center; padding: 16px; z-index: 2147483001; }
.ac-modal__box { background: var(--ac-bg, #fff); color: var(--ac-text, #1c1a17); width: 100%; max-width: 620px; max-height: calc(100vh - 32px); display: flex; flex-direction: column; border-radius: var(--ac-radius, 10px); box-shadow: var(--ac-shadow); overflow: hidden; }
.ac-modal__head { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 22px; border-bottom: 1px solid rgba(0,0,0,.08); }
.ac-modal__title { margin: 0 !important; font-size: 1.15em !important; font-weight: 600 !important; line-height: 1.3 !important; color: inherit !important; letter-spacing: 0 !important; text-transform: none !important; font-family: inherit !important; }
.ac-x { appearance: none; background: none !important; border: 0 !important; font-size: 28px !important; line-height: 1 !important; cursor: pointer; color: inherit !important; padding: 0 4px !important; margin: 0 !important; box-shadow: none !important; min-height: 0 !important; }
.ac-modal__body { padding: 8px 22px 12px; overflow: auto; }
.ac-modal__intro { font-size: .88em; opacity: .85; margin: 10px 0 6px !important; }
.ac-cat { padding: 14px 0; border-bottom: 1px solid rgba(0,0,0,.08); }
.ac-cat:last-child { border-bottom: 0; }
.ac-cat__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.ac-cat__name { font-weight: 600; }
.ac-cat__always { font-size: .76em; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ac-accent, #b0996f); }
.ac-cat__desc { margin: 4px 0 0 !important; font-size: .86em; opacity: .85; }
.ac-cat__cookies { margin-top: 8px; font-size: .8em; }
.ac-cat__cookies summary { cursor: pointer; text-decoration: underline; text-underline-offset: 2px; opacity: .85; }
.ac-cat__cookies ul { margin: 8px 0 0 !important; padding-left: 18px !important; }
.ac-cat__cookies li { margin: 0 0 6px !important; }
.ac-cat__cookies code { font-size: .95em; background: rgba(0,0,0,.05); padding: 1px 5px; border-radius: 4px; }
.ac-switch { position: relative; display: inline-block; width: 44px; height: 24px; flex: 0 0 44px; margin: 0 !important; cursor: pointer; }
.ac-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.ac-switch__ui { position: absolute; inset: 0; border-radius: 12px; background: #c9c3b8; transition: background .2s; }
.ac-switch__ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.ac-switch input:checked + .ac-switch__ui { background: var(--ac-btn, #1c1a17); }
.ac-switch input:checked + .ac-switch__ui::after { transform: translateX(20px); }
.ac-modal__foot { padding: 14px 22px; border-top: 1px solid rgba(0,0,0,.08); justify-content: flex-end; }
html.ac-lock, html.ac-lock body { overflow: hidden !important; }

/* Flytande knapp för att ändra samtycke */
.ac-fab {
  position: fixed; left: 16px; bottom: 16px; z-index: 2147482999; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; padding: 0 !important; margin: 0 !important; cursor: pointer;
  background: var(--ac-bg, #fff) !important; color: var(--ac-text, #1c1a17) !important; border: 1px solid rgba(0,0,0,.12) !important;
  box-shadow: 0 4px 16px rgba(0,0,0,.14) !important; min-height: 0 !important; transition: transform .2s;
}
.ac-fab:hover { transform: scale(1.06); }
.ac-fab svg { width: 24px; height: 24px; }

/* Platshållare för blockerade inbäddningar */
.ac-ph { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 12px; text-align: center; padding: 28px 20px; min-height: 200px; width: 100%;
  background: repeating-linear-gradient(135deg, rgba(0,0,0,.025) 0 12px, rgba(0,0,0,.045) 12px 24px); border: 1px solid rgba(0,0,0,.1); border-radius: 8px; color: var(--ac-text, #1c1a17); }
.ac-ph__text { margin: 0 !important; max-width: 460px; font-size: .9em; }

/* Kortkoder */
.ac-inline-btn { appearance: none; background: none !important; border: 0 !important; padding: 0 !important; margin: 0 !important; font: inherit; color: inherit !important; text-decoration: underline !important; cursor: pointer; box-shadow: none !important; text-transform: none !important; letter-spacing: inherit !important; min-height: 0 !important; }
.ac-decl__wrap { overflow-x: auto; margin: 8px 0 20px; }
.ac-decl__t { width: 100%; border-collapse: collapse; font-size: .86em; }
.ac-decl__t th, .ac-decl__t td { text-align: left; padding: 8px 10px; border-bottom: 1px solid rgba(0,0,0,.1); vertical-align: top; }
.ac-decl__t th { font-weight: 600; white-space: nowrap; }
.ac-decl__t code { white-space: nowrap; }
.ac-status { font-size: .9em; padding: 10px 14px; background: rgba(0,0,0,.04); border-radius: 6px; }

@media (max-width: 760px) {
  .ac { font-size: 14px; }
  .ac--bar .ac-banner, .ac--box .ac-banner { flex-direction: column; align-items: stretch; padding: 16px; }
  .ac--box { left: 10px; right: 10px; bottom: 10px; max-width: none; }
  .ac-banner__actions, .ac-modal__foot { display: grid; grid-template-columns: 1fr 1fr; }
  .ac-banner__actions .ac-btn--ghost, .ac-modal__foot .ac-btn--ghost { grid-column: 1 / -1; }
  .ac-btn { min-width: 0; width: 100%; }
  .ac-modal { padding: 0; align-items: end; }
  .ac-modal__box { max-height: 92vh; border-radius: var(--ac-radius, 10px) var(--ac-radius, 10px) 0 0; }
}
@media (prefers-reduced-motion: reduce) { .ac *, .ac-fab { transition: none !important; } }
@media (max-width: 760px) { .ac-fab { width: 38px; height: 38px; left: 10px; bottom: 10px; } .ac-fab svg { width: 21px; height: 21px; } }
