:root {
  --ro-yellow-950: #202225;
  --ro-yellow-900: #303338;
  --ro-yellow-800: #454950;
  --ro-yellow-700: #5a5f68;
  --ro-yellow-600: #707680;
  --ro-yellow-500: #8a9099;
  --ro-yellow-400: #a7abb2;
  --ro-yellow-300: #c3c6cb;
  --ro-yellow-200: #d9dbdf;
  --ro-yellow-100: #eceef0;
  --ro-yellow-50: #f6f7f8;
}

html[data-market='ro'] body {
  --brand: var(--ro-yellow-700);
  --brand-strong: var(--ro-yellow-950);
  --brand-soft: var(--ro-yellow-100);
  --primary: var(--ro-yellow-800);
  --primary-container: var(--ro-yellow-100);
  --accent: var(--ro-yellow-600);
}

html[data-market='ro'] body,
html[data-market='ro'] body.page-law-detail {
  background-color: var(--ro-yellow-50);
}

html[data-market='ro'] .site-topbar {
  border-bottom-color: rgba(167, 171, 178, 0.45) !important;
  background: linear-gradient(110deg, #25272b, #3e4248 58%, #5a5f68) !important;
  box-shadow: 0 10px 24px rgba(32, 34, 37, 0.2) !important;
}

html[data-market='ro'] .site-topbar-link {
  color: rgba(238, 240, 242, 0.78) !important;
}

html[data-market='ro'] .site-topbar-link:hover,
html[data-market='ro'] .site-topbar-link.active,
html[data-market='ro'] .site-topbar-brand {
  color: #ffffff !important;
}

html[data-market='ro'] .site-topbar-link.active {
  border-bottom-color: var(--ro-yellow-400) !important;
}

html[data-market='ro'] button.primary,
html[data-market='ro'] .button.primary,
html[data-market='ro'] .main-admin-button:not(.secondary),
html[data-market='ro'] .legislative-compare-btn:hover {
  border-color: var(--ro-yellow-800) !important;
  background: var(--ro-yellow-800) !important;
  color: #fff !important;
}

html[data-market='ro'] .badge,
html[data-market='ro'] .pill,
html[data-market='ro'] .requirement-link-status-chip,
html[data-market='ro'] .law-detail-row-status {
  background: var(--ro-yellow-100) !important;
  color: var(--ro-yellow-950) !important;
}

html[data-market='ro'] #aiCard {
  border-color: rgba(90, 95, 104, 0.28) !important;
  background: linear-gradient(145deg, #f3f4f5 0%, #cfd2d6 48%, #8a9099 100%) !important;
  box-shadow: 0 22px 48px rgba(48, 51, 56, 0.2) !important;
  color: var(--ro-yellow-950) !important;
}

html[data-market='ro'] #aiCard #aiTitle,
html[data-market='ro'] #aiCard #aiSummaryBox,
html[data-market='ro'] #aiCard #aiDateLabel,
html[data-market='ro'] #aiCard p,
html[data-market='ro'] #aiCard button,
html[data-market='ro'] #aiCard .material-symbols-outlined,
html[data-market='ro'] #aiCard a {
  color: var(--ro-yellow-950) !important;
}

html[data-market='ro'] #aiNavControls,
html[data-market='ro'] #aiCopyBtn,
html[data-market='ro'] #aiFullscreenBtn,
html[data-market='ro'] #aiExpandBtn,
html[data-market='ro'] #aiSummaryWrapper {
  border-color: rgba(69, 73, 80, 0.22) !important;
  background: rgba(255, 255, 255, 0.42) !important;
}

html[data-market='ro'] #aiFadeOverlay {
  background: linear-gradient(to top, rgba(112, 118, 128, 0.95), transparent) !important;
}

.market-switcher {
  position: fixed;
  top: 11px;
  right: 20px;
  z-index: 2200;
  font-family: "Pretendard", "Noto Sans", Arial, sans-serif;
}

.market-switcher-button {
  min-width: 94px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  backdrop-filter: blur(8px);
}

.market-switcher-button svg { width: 16px; height: 16px; }
.market-switcher-button-label { display: inline-flex; align-items: center; gap: 5px; }
.market-switcher-button .market-switcher-flag-svg,
.market-switcher-country .market-switcher-flag-svg { width: 18px; height: 18px; flex: 0 0 auto; border-radius: 50%; }
.market-switcher-chevron { font-size: 10px; opacity: 0.82; }

.market-switcher-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 218px;
  padding: 7px;
  border: 1px solid rgba(69, 73, 80, 0.16);
  border-radius: 16px;
  background: #f9fafb;
  box-shadow: 0 18px 48px rgba(32, 34, 37, 0.2);
}

.market-switcher-menu[hidden] { display: none; }
.market-switcher-title { padding: 7px 9px 5px; color: #707680; font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.market-switcher-country-group + .market-switcher-country-group { margin-top: 3px; }
.market-switcher-country {
  width: 100%;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 8px 9px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #303338;
  text-align: left;
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  font-weight: 850;
}
.market-switcher-country:hover,
.market-switcher-country[aria-expanded='true'] { background: var(--ro-yellow-100); }
.market-switcher-country-chevron { color: #707680; font-size: 12px; font-weight: 900; }
.market-switcher-languages { display: grid; gap: 2px; margin: 2px 0 4px 30px; padding-left: 7px; border-left: 2px solid #a7abb2; }
.market-switcher-languages[hidden] { display: none; }
.market-switcher-option {
  width: 100%;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 10px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #303338;
  text-align: left;
  cursor: pointer;
}
.market-switcher-languages .market-switcher-option { grid-template-columns: minmax(0, 1fr) auto; padding: 7px 8px; }
.market-switcher-option:hover { background: var(--ro-yellow-100); }
.market-switcher-option.is-active { background: #dde0e4; }
.market-switcher-flag { font-size: 18px; }
.market-switcher-name { display: block; font-size: 11px; line-height: 1.35; font-weight: 800; }
.market-switcher-language { color: #303338; font-size: 11px; line-height: 1.35; font-weight: 800; }
.market-switcher-check { color: var(--ro-yellow-800); font-weight: 900; }

@media (max-width: 980px) {
  .market-switcher { right: 12px; }
  .market-switcher-button { min-width: 82px; padding: 0 8px; }
  .market-switcher-button-label { font-size: 10px; }
}
