.ms-consent-root {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 2147483640;
  font-family: "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #f8fafc;
  pointer-events: none;
}

.ms-consent-root * {
  box-sizing: border-box;
}

.ms-consent-banner,
.ms-consent-panel,
.ms-consent-fab {
  pointer-events: auto;
}

.ms-consent-banner {
  width: min(460px, calc(100vw - 24px));
  margin: 0 12px 12px auto;
  padding: 12px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  align-items: start;
  background: rgba(10, 15, 24, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.32);
  border-radius: 8px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.36);
  backdrop-filter: blur(10px);
}

.ms-consent-kicker {
  margin: 0 0 4px;
  color: #86efac;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ms-consent-title {
  margin: 0 0 4px;
  font-size: 0.92rem;
  line-height: 1.25;
  font-weight: 800;
}

.ms-consent-copy {
  margin: 0;
  color: #cbd5e1;
  font-size: 0.78rem;
  line-height: 1.4;
}

.ms-consent-copy a,
.ms-consent-panel a {
  color: #86efac;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.ms-consent-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.ms-consent-btn,
.ms-consent-fab {
  min-height: 34px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 8px;
  padding: 0 10px;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 800;
  color: #f8fafc;
  background: rgba(15, 23, 42, 0.9);
  cursor: pointer;
}

.ms-consent-btn:hover,
.ms-consent-btn:focus-visible,
.ms-consent-fab:hover,
.ms-consent-fab:focus-visible {
  border-color: #86efac;
  outline: none;
}

.ms-consent-btn-primary {
  color: #052e16;
  background: #86efac;
  border-color: #86efac;
}

.ms-consent-btn-secondary {
  color: #052e16;
  background: #bef264;
  border-color: #bef264;
}

.ms-consent-btn-text {
  background: transparent;
}

.ms-consent-panel {
  width: min(440px, calc(100vw - 24px));
  max-height: min(680px, calc(100vh - 24px));
  margin: 0 12px 12px auto;
  overflow: auto;
  padding: 14px;
  background: rgba(10, 15, 24, 0.98);
  border: 1px solid rgba(148, 163, 184, 0.32);
  border-radius: 8px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}

.ms-consent-panel[hidden],
.ms-consent-banner[hidden],
.ms-consent-fab[hidden] {
  display: none;
}

.ms-consent-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.ms-consent-close {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 8px;
}

.ms-consent-choice {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid rgba(148, 163, 184, 0.22);
}

.ms-consent-choice strong {
  display: block;
  margin-bottom: 3px;
  font-size: 0.84rem;
}

.ms-consent-choice span {
  display: block;
  color: #cbd5e1;
  font-size: 0.75rem;
  line-height: 1.4;
}

.ms-consent-switch {
  position: relative;
  display: inline-flex;
  width: 48px;
  height: 28px;
}

.ms-consent-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.ms-consent-slider {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #334155;
  border: 1px solid rgba(148, 163, 184, 0.5);
}

.ms-consent-slider::before {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  left: 3px;
  top: 3px;
  border-radius: 50%;
  background: #f8fafc;
  transition: transform 0.18s ease;
}

.ms-consent-switch input:checked + .ms-consent-slider {
  background: #22c55e;
  border-color: #22c55e;
}

.ms-consent-switch input:checked + .ms-consent-slider::before {
  transform: translateX(20px);
}

.ms-consent-switch input:disabled + .ms-consent-slider {
  opacity: 0.6;
  cursor: not-allowed;
}

.ms-consent-panel-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-top: 12px;
}

.ms-consent-note {
  margin: 10px 0 0;
  color: #94a3b8;
  font-size: 0.72rem;
  line-height: 1.4;
}

.ms-consent-fab {
  position: fixed;
  left: 12px;
  bottom: 12px;
  min-height: 36px;
  padding: 0 12px;
  background: rgba(10, 15, 24, 0.88);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

@media (max-width: 760px) {
  .ms-consent-banner {
    width: calc(100vw - 16px);
    margin: 0 auto 8px;
    padding: 10px;
    gap: 8px;
  }

  .ms-consent-title {
    font-size: 0.86rem;
  }

  .ms-consent-copy {
    font-size: 0.73rem;
    line-height: 1.32;
  }

  .ms-consent-actions {
    grid-template-columns: minmax(112px, 1.25fr) minmax(0, 0.9fr) minmax(0, 0.95fr);
    gap: 5px;
  }

  .ms-consent-panel-actions {
    grid-template-columns: 1fr;
  }

  .ms-consent-btn {
    width: 100%;
    min-height: 31px;
    padding: 0 6px;
    font-size: 0.68rem;
  }
}

@media (max-width: 420px) {
  .ms-consent-banner {
    padding: 8px;
    gap: 6px;
  }

  .ms-consent-kicker {
    display: none;
  }

  .ms-consent-title {
    margin-bottom: 2px;
    font-size: 0.82rem;
  }

  .ms-consent-copy {
    font-size: 0.7rem;
    line-height: 1.25;
  }

  .ms-consent-actions {
    gap: 5px;
  }

  .ms-consent-btn {
    min-height: 30px;
    font-size: 0.66rem;
  }
}
