.ms-cc[hidden],
.ms-cc [hidden] { display: none !important; }

.ms-cc {
  --cc-bg: #0e0e10;
  --cc-fg: #fff;
  --cc-muted: rgba(255, 255, 255, .72);
  --cc-line: rgba(255, 255, 255, .2);
  font-family: Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--cc-fg);
}

.ms-cc *, .ms-cc *::before, .ms-cc *::after { box-sizing: border-box; }

.ms-cc__banner {
  position: fixed;
  z-index: 100000;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  max-width: 44rem;
  padding: 1.25rem 1.5rem;
  background: var(--cc-bg);
  border: 1px solid var(--cc-line);
  border-radius: .75rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .35);
}

.ms-cc__title { margin: 0 0 .5rem; font-size: 1.125rem; line-height: 1.3; color: var(--cc-fg); }
.ms-cc__text { margin: 0 0 1rem; color: var(--cc-muted); }
.ms-cc__policy { color: var(--cc-fg); text-decoration: underline; }

.ms-cc__actions { display: flex; flex-wrap: wrap; gap: .5rem; }

/* Accept and Reject share the same style so neither is visually nudged (GDPR / EDPB guidance). */
.ms-cc__btn {
  flex: 1 1 8rem;
  padding: .7rem 1rem;
  font: inherit;
  font-weight: 600;
  color: #0e0e10;
  background: #fff;
  border: 1px solid #fff;
  border-radius: 999px;
  cursor: pointer;
}
.ms-cc__btn--ghost { color: var(--cc-fg); background: transparent; border-color: var(--cc-line); }
.ms-cc__btn:hover { opacity: .85; }
.ms-cc__btn:focus-visible, .ms-cc__x:focus-visible, .ms-cc__policy:focus-visible,
.ms-cc__switch input:focus-visible + span { outline: 2px solid #6ea8ff; outline-offset: 2px; }

.ms-cc__overlay {
  position: fixed;
  z-index: 100001;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0, 0, 0, .6);
}

.ms-cc__dialog {
  width: 100%;
  max-width: 38rem;
  max-height: 90vh;
  overflow-y: auto;
  padding: 1.5rem;
  background: var(--cc-bg);
  border: 1px solid var(--cc-line);
  border-radius: .75rem;
  outline: none;
}

.ms-cc__dhead { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.ms-cc__x { padding: 0 .25rem; font-size: 1.75rem; line-height: 1; color: var(--cc-fg); background: none; border: 0; cursor: pointer; }

.ms-cc__cat {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
  border-top: 1px solid var(--cc-line);
}
.ms-cc__cat:last-of-type { margin-bottom: 1rem; border-bottom: 1px solid var(--cc-line); }
.ms-cc__cat p { margin: .25rem 0 0; color: var(--cc-muted); }
.ms-cc__always { flex: none; color: var(--cc-muted); font-size: .8125rem; }

.ms-cc__switch { position: relative; flex: none; width: 2.75rem; height: 1.5rem; cursor: pointer; }
.ms-cc__switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.ms-cc__switch span { position: absolute; inset: 0; background: #555; border-radius: 999px; transition: background .2s; }
.ms-cc__switch span::after {
  content: '';
  position: absolute;
  top: .1875rem;
  left: .1875rem;
  width: 1.125rem;
  height: 1.125rem;
  background: #fff;
  border-radius: 50%;
  transition: transform .2s;
}
.ms-cc__switch input:checked + span { background: #2e9e5b; }
.ms-cc__switch input:checked + span::after { transform: translateX(1.25rem); }

html.ms-cc-lock, html.ms-cc-lock body { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  .ms-cc__switch span, .ms-cc__switch span::after { transition: none; }
}

@media (max-width: 480px) {
  .ms-cc__banner { left: .5rem; right: .5rem; bottom: .5rem; padding: 1rem; }
}
