.mcm-root {
  --mcm-orange: #e64b00;
  --mcm-orange-soft: #fff3eb;
  --mcm-text: #243247;
  --mcm-muted: #69778a;
  --mcm-border: #e7ebf0;
  --mcm-surface: #ffffff;
  --mcm-soft: #f7f9fb;
  position: relative;
  color: var(--mcm-text);
  font-family: inherit;
  font-family: "Open Sans", sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.45;
}

.mcm-root *, .mcm-root *::before, .mcm-root *::after { box-sizing: border-box; }
.mcm-root [hidden] { display: none !important; }
.mcm-root button, .mcm-root a, .mcm-root strong { font-family: "Open Sans", sans-serif; }
.mcm-root button, .mcm-root a { font-size: inherit; font-weight: 400; text-transform: none !important; letter-spacing: normal; }
.mcm-root button { cursor: pointer; }
.mcm-root a { text-decoration: none; }
.mcm-root a:hover { text-decoration: underline; }
.mcm-root :focus-visible { outline: 3px solid var(--mcm-orange); outline-offset: 2px; }
.mcm-message { padding: 12px 16px; color: #8d3000; background: #fff1e6; }

.mcm-root .mcm-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 46px;
  padding: 9px 16px;
  border: 0;
  border-radius: 6px;
  background: var(--mcm-orange);
  color: #fff;
  font-weight: 600;
  white-space: nowrap;
}
.mcm-root .mcm-trigger:hover, .mcm-root .mcm-trigger[aria-expanded="true"] { background: #b74400; }
.mcm-root .mcm-trigger-chevron { font-size: 20px; line-height: 1; margin-left: 8px; }
.mcm-root .mcm-trigger-icon { font-size: 19px; line-height: 1; }

.mcm-root .mcm-panel {
  position: absolute;
  z-index: 9999;
  top: calc(100% + 22px);
  left: 0;
  width: min(1180px, calc(100vw - 32px));
  max-width: none;
  border: 1px solid var(--mcm-border);
  border-radius: 10px;
  background: var(--mcm-surface);
  box-shadow: 0 22px 55px rgba(21, 37, 56, .18);
  overflow: hidden;
}
.mcm-root[data-mcm-mode="preview"] .mcm-panel {
  position: relative;
  top: auto;
  margin-top: 10px;
  width: min(1180px, 100%);
}
.mcm-root .mcm-desktop { display: grid; grid-template-columns: minmax(270px, 30%) minmax(0, 34%) minmax(0, 36%); min-height: 420px; }
.mcm-root .mcm-desktop-roots, .mcm-root .mcm-desktop-children, .mcm-root .mcm-desktop-grandchildren {
  min-width: 0;
  max-height: min(70vh, 650px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 20px 16px 26px;
}
.mcm-root .mcm-desktop-roots { background: var(--mcm-soft); border-right: 1px solid var(--mcm-border); }
.mcm-root .mcm-desktop-children { border-right: 1px solid var(--mcm-border); }
.mcm-root .mcm-column-title { display: block; margin: 2px 10px 14px; color: var(--mcm-muted); font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.mcm-root .mcm-row { display: flex; align-items: stretch; min-width: 0; margin: 2px 0; border: 1px solid transparent; border-radius: 7px; }
.mcm-root .mcm-category-image { flex: none; width: 38px; height: 38px; margin: 7px 0 7px 7px; border-radius: 5px; object-fit: cover; }
.mcm-root .mcm-row:hover { border-color: #ffddc8; background: #fff8f3; }
.mcm-root .mcm-row.is-selected { border-color: #ffddc8; background: var(--mcm-orange-soft); }
.mcm-root .mcm-row > button, .mcm-root .mcm-row > a.mcm-main-link {
  display: flex;
  flex: 1;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 11px;
  border: 0;
  background: none;
  color: var(--mcm-text);
  text-align: left;
  line-height: 1.4;
}
.mcm-root .mcm-row.is-selected > button { color: var(--mcm-orange); font-weight: 600; }
.mcm-root .mcm-row > a.mcm-main-link:hover { color: var(--mcm-orange); }
.mcm-root .mcm-row .mcm-chevron { flex: none; color: var(--mcm-muted); font-size: 21px; line-height: 1; }
.mcm-root .mcm-row > a.mcm-row-all {
  align-self: center;
  flex: none;
  padding: 8px 10px;
  color: var(--mcm-muted);
  font-size: 11px;
  white-space: nowrap;
}
.mcm-root .mcm-all-link { display: inline-block; margin: 14px 10px 0; color: var(--mcm-orange); font-size: 14px; font-weight: 600; }
.mcm-root .mcm-back-link { display: inline-block; margin: 0 10px 15px; padding: 3px 0; border: 0; background: none; color: var(--mcm-orange); }
.mcm-root .mcm-empty { margin: 10px; color: var(--mcm-muted); }
.mcm-root .mcm-mobile-head, .mcm-root .mcm-mobile-list { display: none; }
.mcm-root .mcm-fallback { padding: 12px 16px; background: var(--mcm-surface); border: 1px solid var(--mcm-border); }
.mcm-root .mcm-fallback ul { margin: 6px 0 6px 18px; padding-left: 12px; list-style: none; }
.mcm-root .mcm-fallback li { padding: 4px 0; }
.mcm-root .mcm-fallback a { color: var(--mcm-text); }

@media (max-width: 767px) {
  body.mcm-no-scroll { overflow: hidden; }
  body > .mcm-root.mcm-portal {
    position: fixed !important;
    inset: 0 !important;
    z-index: 2147483647 !important;
    width: 100vw;
    height: 100dvh;
  }
  .mcm-root .mcm-trigger { width: 52px; min-width: 52px; min-height: 44px; padding: 8px; }
  .mcm-root .mcm-trigger > span:not(.mcm-trigger-icon) { display: none; }
  .mcm-root .mcm-trigger-icon { font-size: 25px; }
  .mcm-root .mcm-panel, .mcm-root[data-mcm-mode="preview"] .mcm-panel {
    position: fixed;
    z-index: 999999;
    inset: 0;
    width: 100%;
    height: 100dvh;
    margin: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    overflow-y: auto;
    background: var(--mcm-surface);
  }
  .mcm-root .mcm-desktop { display: none; }
  .mcm-root .mcm-mobile-head {
    position: sticky;
    z-index: 1;
    top: 0;
    display: flex;
    align-items: center;
    min-height: 62px;
    gap: 8px;
    padding: 8px 13px;
    border-bottom: 1px solid var(--mcm-border);
    background: var(--mcm-surface);
  }
  .mcm-root .mcm-mobile-head strong { flex: 1; min-width: 0; font-size: 18px; font-weight: 600; }
  .mcm-root .mcm-mobile-head button { width: 43px; height: 43px; border: 0; border-radius: 4px; background: none; color: var(--mcm-text); font-size: 29px; line-height: 1; }
  .mcm-root .mcm-mobile-head button:hover { background: var(--mcm-orange-soft); }
  .mcm-root .mcm-mobile-list { display: block; padding: 12px 14px 40px; }
  .mcm-root .mcm-mobile-list .mcm-row { border-bottom: 1px solid var(--mcm-border); border-radius: 0; }
  .mcm-root .mcm-mobile-list .mcm-category-image { width: 42px; height: 42px; margin: 5px 2px 5px 0; }
  .mcm-root .mcm-mobile-list .mcm-row > button, .mcm-root .mcm-mobile-list .mcm-row > a.mcm-main-link {
    min-height: 53px;
    padding: 13px 8px;
    font-size: 16px;
  }
  .mcm-root .mcm-mobile-list .mcm-row > a.mcm-row-all { font-size: 12px; }
  .mcm-root .mcm-mobile-list .mcm-all-link { display: block; padding: 13px 8px; margin: 3px 0 7px; font-size: 15px; }
}

@media (prefers-reduced-motion: no-preference) {
  .mcm-root .mcm-row { transition: background-color .12s ease; }
}
