.mc-sidebar .mc-sidebar-legal {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  margin: 4px 0 0;
  padding: 0;
  box-sizing: border-box;
}

.mc-sidebar .mc-sidebar-legal a {
  display: inline;
  opacity: 1 !important;
  max-width: none !important;
  width: auto !important;
  height: auto !important;
  min-height: 0 !important;
  padding: 0 !important;
  overflow: visible !important;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--slate-600, #475569);
  text-decoration: none;
  background: transparent;
}

.mc-sidebar .mc-sidebar-legal a:hover {
  color: var(--primary, #0284c7);
  text-decoration: underline;
}

.mc-sidebar.is-collapsed .mc-sidebar-legal,
.mc-sidebar[data-collapsed="true"]:not(.is-expanded) .mc-sidebar-legal {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  margin: 4px 0 0;
  padding: 0;
}

.mc-sidebar.is-collapsed .mc-sidebar-legal a,
.mc-sidebar[data-collapsed="true"]:not(.is-expanded) .mc-sidebar-legal a {
  display: block;
  width: 100%;
  font-size: 11px;
  text-align: center;
}

.mc-sidebar.is-expanded .mc-sidebar-legal,
.mc-sidebar[data-collapsed="false"] .mc-sidebar-legal {
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 16px;
  width: 100%;
  margin-top: 10px;
  padding: 4px 0 2px;
}

.mc-sidebar.is-expanded .mc-sidebar-legal a,
.mc-sidebar[data-collapsed="false"] .mc-sidebar-legal a {
  display: inline;
  width: auto;
  font-size: 13px;
  text-align: center;
}

html[data-theme="dark"] .mc-sidebar .mc-sidebar-legal a {
  color: #e2e8f0;
}

html[data-theme="dark"] .mc-sidebar .mc-sidebar-legal a:hover {
  color: #7dd3fc;
}

.mobile-header .mobile-legal-links {
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle, #e2e8f0);
  justify-content: flex-start;
  gap: 16px;
}

.mobile-header .mobile-legal-links a {
  font-weight: 700;
}

html[data-theme="dark"] .mobile-header .mobile-legal-links a {
  color: #e2e8f0;
}

.legal-popup {
  position: fixed;
  inset: 0;
  z-index: 1000000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 28px 16px;
}

.legal-popup.is-open {
  display: flex;
}

.legal-popup-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.46);
  backdrop-filter: blur(8px);
}

.legal-popup-dialog {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(920px, 100%);
  height: min(88vh, 860px);
  background: var(--bg-card, #fff);
  color: var(--slate-900, #0f172a);
  border: 1px solid var(--slate-200, #e2e8f0);
  border-radius: 24px;
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.28);
  overflow: hidden;
}

.legal-popup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px 16px 22px;
  border-bottom: 1px solid var(--slate-200, #e2e8f0);
  background: var(--bg-card, #fff);
}

.legal-popup-kicker {
  margin: 0 0 2px;
  color: var(--primary, #0284c7);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.legal-popup-header h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.25;
}

.legal-popup-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--slate-200, #e2e8f0);
  border-radius: 999px;
  background: var(--slate-50, #f8fafc);
  color: var(--slate-700, #334155);
  cursor: pointer;
  flex-shrink: 0;
}

.legal-popup-frame {
  flex: 1;
  width: 100%;
  border: 0;
  background: var(--bg-card, #fff);
}

.footer-main .footer-row a {
  margin: 0 4px;
}

@media (max-width: 700px) {
  .legal-popup {
    padding: 0;
    align-items: stretch;
  }

  .legal-popup-dialog {
    width: 100%;
    height: 100%;
    border-radius: 0;
    border: 0;
  }
}
