/* LIMAC consent banner (replaces Cookiebot). Everything scoped under #lmc-cc. */
#lmc-cc {
  --lmc-cc-bg: #ffffff;
  --lmc-cc-fg: #1e2022;
  --lmc-cc-muted: #5f6b7a;
  --lmc-cc-line: #e3e8f0;
  --lmc-cc-brand: #377dff;
  --lmc-cc-brand-ink: #ffffff;
  --lmc-cc-soft: rgba(30, 32, 34, .07);
  --lmc-cc-ok: #1f9d6b;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
@media (prefers-color-scheme: dark) {
  #lmc-cc {
    --lmc-cc-bg: #171e2d;
    --lmc-cc-fg: #e6eaf2;
    --lmc-cc-muted: #9aa6b8;
    --lmc-cc-line: #2a3447;
    --lmc-cc-brand: #5b93ff;
    --lmc-cc-brand-ink: #0b1220;
    --lmc-cc-soft: rgba(230, 234, 242, .09);
    --lmc-cc-ok: #3fc48d;
    color-scheme: dark;
  }
}
#lmc-cc *, #lmc-cc *::before, #lmc-cc *::after { box-sizing: border-box; }
#lmc-cc [hidden] { display: none !important; }
#lmc-cc p { margin: 0; }

/* ---- banner ---- */
#lmc-cc .lmc-cc-banner {
  position: fixed; z-index: 2147483000;
  left: 50%; transform: translateX(-50%);
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  width: calc(100% - 32px); max-width: 680px;
  background: var(--lmc-cc-bg); color: var(--lmc-cc-fg);
  border: 1px solid var(--lmc-cc-line); border-radius: 18px;
  box-shadow: 0 10px 40px rgba(16, 30, 60, .16);
  padding-block: 16px; padding-inline: 22px 16px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px;
  animation: lmc-cc-up .35s cubic-bezier(.2, .8, .2, 1) both;
}
@keyframes lmc-cc-up { from { opacity: 0; transform: translate(-50%, 14px); } to { opacity: 1; transform: translate(-50%, 0); } }
#lmc-cc .lmc-cc-text { flex: 1 1 300px; min-width: 0; }
#lmc-cc .lmc-cc-title { font-size: 14.5px; font-weight: 600; letter-spacing: -.005em; margin-bottom: 2px; color: var(--lmc-cc-fg); }
#lmc-cc .lmc-cc-desc { font-size: 13px; color: var(--lmc-cc-muted); }
#lmc-cc .lmc-cc-desc a { color: var(--lmc-cc-muted); text-decoration: underline; text-underline-offset: 2px; }
#lmc-cc .lmc-cc-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }

/* ---- buttons ---- */
#lmc-cc .lmc-cc-btn {
  font-family: inherit; font-size: 13.5px; font-weight: 600; line-height: 1.2;
  border: 0; border-radius: 999px; padding: 11px 20px; cursor: pointer; white-space: nowrap;
  background: var(--lmc-cc-soft); color: var(--lmc-cc-fg);
  transition: filter .15s, transform .15s;
}
#lmc-cc .lmc-cc-btn:hover { filter: brightness(.96); }
#lmc-cc .lmc-cc-primary {
  background: var(--lmc-cc-brand); color: var(--lmc-cc-brand-ink);
  box-shadow: 0 4px 14px rgba(55, 125, 255, .35);
}
#lmc-cc .lmc-cc-primary:hover { filter: brightness(1.07); }
#lmc-cc .lmc-cc-btn:active { transform: scale(.98); }
#lmc-cc .lmc-cc-link {
  font-family: inherit; font-size: 12.5px; font-weight: 500; line-height: 1.2;
  background: none; border: 0; color: var(--lmc-cc-muted); cursor: pointer;
  padding: 11px 8px; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap;
}
#lmc-cc button:focus-visible, #lmc-cc a:focus-visible, #lmc-cc .lmc-cc-sw input:focus-visible + span {
  outline: 3px solid var(--lmc-cc-brand); outline-offset: 2px;
}

/* ---- preferences dialog ---- */
#lmc-cc .lmc-cc-overlay {
  position: fixed; inset: 0; z-index: 2147483001;
  background: rgba(10, 18, 34, .45);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  display: grid; place-items: center; padding: 16px;
  animation: lmc-cc-fade .2s ease both;
}
@keyframes lmc-cc-fade { from { opacity: 0; } to { opacity: 1; } }
#lmc-cc .lmc-cc-modal {
  background: var(--lmc-cc-bg); color: var(--lmc-cc-fg);
  width: 100%; max-width: 460px; max-height: calc(100vh - 32px); overflow: auto;
  border-radius: 20px; box-shadow: 0 24px 70px rgba(0, 0, 0, .3); padding: 6px 0;
}
#lmc-cc .lmc-cc-mhead { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 18px 22px 10px; }
#lmc-cc .lmc-cc-mtitle { font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
#lmc-cc .lmc-cc-msub { font-size: 13px; color: var(--lmc-cc-muted); margin-top: 4px; }
#lmc-cc .lmc-cc-x { background: none; border: 0; font-size: 24px; line-height: 1; color: var(--lmc-cc-muted); cursor: pointer; padding: 2px 6px; border-radius: 8px; }
#lmc-cc .lmc-cc-cat { padding: 12px 22px; display: grid; gap: 2px; }
#lmc-cc .lmc-cc-cat + .lmc-cc-cat { border-top: 1px solid var(--lmc-cc-line); }
#lmc-cc .lmc-cc-crow { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
#lmc-cc .lmc-cc-cname { font-size: 14px; font-weight: 600; }
#lmc-cc .lmc-cc-cdesc { font-size: 12.5px; color: var(--lmc-cc-muted); }
#lmc-cc .lmc-cc-always { font-size: 12px; font-weight: 600; color: var(--lmc-cc-ok); white-space: nowrap; }
#lmc-cc .lmc-cc-sw { position: relative; display: inline-block; width: 42px; height: 24px; flex: none; margin: 0; cursor: pointer; }
#lmc-cc .lmc-cc-sw input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
#lmc-cc .lmc-cc-sw span { position: absolute; inset: 0; background: var(--lmc-cc-line); border-radius: 24px; transition: background .2s; pointer-events: none; }
#lmc-cc .lmc-cc-sw span::before {
  content: ""; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px;
  background: #fff; border-radius: 50%; box-shadow: 0 1px 2px rgba(0, 0, 0, .3); transition: transform .2s;
}
#lmc-cc .lmc-cc-sw input:checked + span { background: var(--lmc-cc-brand); }
#lmc-cc .lmc-cc-sw input:checked + span::before { transform: translateX(18px); }
/* Arabic: mirror the switches and keep the text right-aligned */
#lmc-cc[dir="rtl"] .lmc-cc-sw span::before { left: auto; right: 3px; }
#lmc-cc[dir="rtl"] .lmc-cc-sw input:checked + span::before { transform: translateX(-18px); }
#lmc-cc[dir="rtl"] { text-align: right; }
#lmc-cc .lmc-cc-mfoot { padding: 14px 22px 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
#lmc-cc .lmc-cc-mfoot .lmc-cc-primary { flex: 1 1 100%; order: -1; margin-bottom: 4px; }
#lmc-cc .lmc-cc-mfoot .lmc-cc-btn:not(.lmc-cc-primary) { flex: 1; }

/* ---- corner button ---- */
#lmc-cc .lmc-cc-fab {
  position: fixed; z-index: 2147482999;
  left: calc(16px + env(safe-area-inset-left, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--lmc-cc-bg); color: var(--lmc-cc-muted);
  border: 1px solid var(--lmc-cc-line); box-shadow: 0 4px 12px rgba(16, 30, 60, .12);
  display: grid; place-items: center; cursor: pointer; padding: 0;
  opacity: .85; transition: opacity .15s, color .15s;
}
#lmc-cc .lmc-cc-fab:hover { opacity: 1; color: var(--lmc-cc-brand); }

/* ---- toast (same feel as the site's save toast) ---- */
#lmc-cc .lmc-cc-toast {
  position: fixed; z-index: 2147483002; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  transform: translate(-50%, 12px); opacity: 0; pointer-events: none;
  background: var(--lmc-cc-fg); color: var(--lmc-cc-bg);
  font-size: 13px; font-weight: 500; padding: 10px 16px; border-radius: 999px;
  transition: opacity .2s, transform .2s;
}
#lmc-cc .lmc-cc-toast.lmc-cc-show { opacity: 1; transform: translate(-50%, 0); }

/* ---- phones ---- */
@media (max-width: 560px) {
  #lmc-cc .lmc-cc-banner { padding: 16px; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); width: calc(100% - 20px); }
  #lmc-cc .lmc-cc-actions { width: 100%; }
  #lmc-cc .lmc-cc-actions .lmc-cc-primary { flex: 1 1 100%; order: -1; }
  #lmc-cc .lmc-cc-actions .lmc-cc-btn:not(.lmc-cc-primary) { flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
  #lmc-cc *, #lmc-cc .lmc-cc-banner, #lmc-cc .lmc-cc-overlay { animation: none !important; transition: none !important; }
}
