/* =========================================================================
   Arvis Cookies — card consimtamant + panou preferinte
   Tokeni semantici => dark mode automat pe [data-theme="dark"].
   ========================================================================= */

.arvis-cc {
  position: fixed;
  left: var(--sp-5, 20px);
  bottom: var(--sp-5, 20px);
  z-index: 9991; /* peste bottom-nav (9985) */
  width: 100%;
  max-width: 460px;
  background: var(--surface, #fff);
  color: var(--on-surface, #111827);
  border: 1px solid var(--line, #e5e7eb);
  border-radius: var(--shape-l, 20px);
  box-shadow: var(--elev-4, 0 16px 40px rgba(17, 24, 39, .12));
  padding: var(--sp-6, 24px);
  /* animatie intrare */
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .25s ease, transform .25s ease;
}
.arvis-cc.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.arvis-cc[hidden] { display: none; }

.arvis-cc__close {
  position: absolute;
  top: var(--sp-4, 16px);
  right: var(--sp-4, 16px);
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  color: var(--on-surface-faded, #6b7280);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  border-radius: var(--shape-full, 999px);
}
.arvis-cc__close:hover { color: var(--on-surface, #111827); }

.arvis-cc__head {
  display: flex;
  align-items: center;
  gap: var(--sp-3, 12px);
  padding-right: var(--sp-7, 32px); /* loc pentru X */
}
.arvis-cc__icon {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: var(--shape-s, 12px);
  background: var(--arvis-midnight, #111827);
  color: var(--arvis-ember, #ff5c35);
}
.arvis-cc__eyebrow {
  margin: 0 0 2px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--arvis-ember, #ff5c35);
}
.arvis-cc__title {
  margin: 0;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--on-surface, #111827);
}

.arvis-cc__text {
  margin: var(--sp-4, 16px) 0 var(--sp-5, 20px);
  font-size: 14px;
  line-height: 1.5;
  color: var(--on-surface-faded, #6b7280);
}
.arvis-cc__policy-link {
  font-weight: 700;
  color: var(--on-surface, #111827);
  text-decoration: underline;
}

.arvis-cc__actions {
  display: flex;
  gap: var(--sp-3, 12px);
}

.arvis-cc__btn {
  flex: 1 1 0;
  min-height: 48px;
  padding: 0 var(--sp-4, 16px);
  border-radius: var(--shape-full, 999px);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, color .18s ease;
}
.arvis-cc__btn--primary {
  background: var(--arvis-ember, #ff5c35);
  border: 2px solid var(--arvis-ember, #ff5c35);
  color: #fff;
}
.arvis-cc__btn--primary:hover {
  background: var(--arvis-ember-dark, #e5502b);
  border-color: var(--arvis-ember-dark, #e5502b);
}
.arvis-cc__btn--outline {
  background: transparent;
  border: 2px solid var(--on-surface, #111827);
  color: var(--on-surface, #111827);
}
.arvis-cc__btn--outline:hover {
  background: var(--surface-2, #f4f5f7);
}

.arvis-cc__link {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2, 8px);
  margin: var(--sp-4, 16px) auto 0;
  padding: var(--sp-2, 8px);
  border: none;
  background: transparent;
  font-size: 14px;
  font-weight: 600;
  color: var(--on-surface-faded, #6b7280);
  cursor: pointer;
}
.arvis-cc__link:hover { color: var(--on-surface, #111827); }

/* ---- Panou preferinte ---- */
.arvis-cc__prefs[hidden] { display: none; }
.arvis-cc__cats {
  list-style: none;
  margin: var(--sp-5, 20px) 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3, 12px);
}
.arvis-cc__cat {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-4, 16px);
  padding: var(--sp-4, 16px);
  border: 1px solid var(--line, #e5e7eb);
  border-radius: var(--shape-m, 16px);
}
.arvis-cc__cat-text { display: flex; flex-direction: column; gap: 2px; }
.arvis-cc__cat-name { font-size: 14px; font-weight: 700; color: var(--on-surface, #111827); }
.arvis-cc__cat-desc { font-size: 12.5px; line-height: 1.4; color: var(--on-surface-faded, #6b7280); }

/* toggle switch */
.arvis-cc__switch {
  position: relative;
  flex: 0 0 auto;
  width: 44px;
  height: 26px;
  display: inline-block;
}
.arvis-cc__switch input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}
.arvis-cc__slider {
  position: absolute;
  inset: 0;
  background: var(--surface-3, #edeef2);
  border-radius: var(--shape-full, 999px);
  transition: background .18s ease;
}
.arvis-cc__slider::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  box-shadow: var(--elev-1, 0 1px 3px rgba(17, 24, 39, .06));
  transition: transform .18s ease;
}
.arvis-cc__switch input:checked + .arvis-cc__slider {
  background: var(--arvis-ember, #ff5c35);
}
.arvis-cc__switch input:checked + .arvis-cc__slider::before {
  transform: translateX(18px);
}
.arvis-cc__switch--locked .arvis-cc__slider { background: var(--arvis-jade, #22c55e); opacity: .7; }
.arvis-cc__switch input:disabled { cursor: not-allowed; }

/* focus vizibil (a11y) */
.arvis-cc__btn:focus-visible,
.arvis-cc__link:focus-visible,
.arvis-cc__close:focus-visible,
.arvis-cc__switch input:focus-visible + .arvis-cc__slider {
  outline: none;
  box-shadow: var(--elev-focus, 0 0 0 3px rgba(255, 92, 53, .18));
}

/* ---- Mobil: full-width jos, deasupra bottom-nav ---- */
@media (max-width: 767px) {
  .arvis-cc {
    left: var(--sp-3, 12px);
    right: var(--sp-3, 12px);
    bottom: calc(60px + env(safe-area-inset-bottom, 0px) + 12px);
    width: auto;
    max-width: none;
    padding: var(--sp-5, 20px);
  }
  .arvis-cc__actions { flex-direction: column; }
  .arvis-cc__btn { width: 100%; }
}

/* ---- Dark mode: ajustari peste tokeni (outline alb pe fundal inchis) ---- */
[data-theme="dark"] .arvis-cc__btn--outline {
  border-color: var(--dark-on, #fff);
  color: var(--dark-on, #fff);
}
[data-theme="dark"] .arvis-cc__btn--outline:hover {
  background: var(--dark-surface-3, #29303d);
}
[data-theme="dark"] .arvis-cc__icon {
  background: var(--dark-surface-3, #29303d);
}
