/* CMS Menu Builder v5 -------------------------------------------- */

.cms-menu-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 16px;
}

.cms-menu-card {
  border-radius: 14px;
}

.cms-menu-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.cms-menu-card-head h2 {
  margin: 4px 0 0;
  color: #032e4d;
  font: 650 1.12rem "Barlow", sans-serif;
}

.cms-menu-card-head p {
  margin: 5px 0 0;
  color: #7e9198;
  font: 500 .61rem "Work Sans", sans-serif;
}

.cms-menu-status {
  flex: 0 0 auto;
  padding: 6px 9px;
  border-radius: 999px;
  font: 700 .54rem "Work Sans", sans-serif;
}

.cms-menu-status.is-enabled {
  color: #27744a;
  background: #e7f6ed;
}

.cms-menu-status.is-disabled {
  color: #80621b;
  background: #fff4d6;
}

.cms-menu-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.cms-menu-builder-help {
  margin-bottom: 17px;
  padding: 13px 14px;
  background: #f2f8fa;
  border: 1px solid #d8e8ed;
  border-radius: 9px;
}

.cms-menu-builder-help strong {
  display: block;
  color: #054d7f;
  font: 700 .65rem "Work Sans", sans-serif;
}

.cms-menu-builder-help p {
  margin: 4px 0 0;
  color: #647b85;
  font: 400 .61rem/1.5 "Work Sans", sans-serif;
}

.cms-menu-tree {
  display: grid;
  gap: 8px;
}

.cms-menu-tree-item {
  padding-left: calc(var(--menu-depth) * 25px);
}

.cms-menu-tree-row {
  display: grid;
  grid-template-columns: 28px minmax(0,1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 11px 12px;
  background: #fafcfd;
  border: 1px solid #e1e8eb;
  border-left: 4px solid #0a7ca7;
  border-radius: 9px;
}

.cms-menu-tree-item[style*="--menu-depth:1"] > .cms-menu-tree-row,
.cms-menu-tree-item[style*="--menu-depth:2"] > .cms-menu-tree-row,
.cms-menu-tree-item[style*="--menu-depth:3"] > .cms-menu-tree-row {
  border-left-color: #f28d01;
}

.cms-menu-tree-handle {
  display: grid;
  place-items: center;
  width: 28px;
  height: 34px;
  color: #9aa8ad;
  background: #f0f4f6;
  border-radius: 6px;
  font-size: .8rem;
  user-select: none;
}

.cms-menu-tree-copy {
  min-width: 0;
}

.cms-menu-tree-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.cms-menu-tree-badges span {
  padding: 3px 6px;
  color: #72858d;
  background: #edf2f4;
  border-radius: 999px;
  font: 650 .44rem "Work Sans", sans-serif;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.cms-menu-tree-badges span.is-button-style {
  color: #995d07;
  background: #fff2d9;
}

.cms-menu-tree-badges span.is-hidden {
  color: #9b4e40;
  background: #fff0ed;
}

.cms-menu-tree-copy > strong {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: #294653;
  font: 650 .68rem "Work Sans", sans-serif;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cms-menu-tree-copy > small {
  display: block;
  margin-top: 3px;
  overflow-wrap: anywhere;
  color: #82949b;
  font: 500 .54rem/1.4 "Work Sans", sans-serif;
}

.cms-menu-tree-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.cms-menu-tree-actions form {
  margin: 0;
}

@media screen and (max-width: 760px) {
  .cms-menu-grid {
    grid-template-columns: 1fr;
  }

  .cms-menu-tree-item {
    padding-left: calc(var(--menu-depth) * 12px);
  }

  .cms-menu-tree-row {
    grid-template-columns: 24px minmax(0,1fr);
  }

  .cms-menu-tree-actions {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
  }

  .cms-menu-tree-actions form,
  .cms-menu-tree-actions .button {
    width: 100%;
  }
}

.cms-menu-tree-row.is-hidden-item {
  opacity: .62;
  background: #f6f8f9;
  border-left-color: #9aa8ad;
}

.cms-menu-tree-row.is-hidden-item .cms-menu-tree-copy > strong {
  color: #718188;
}

.cms-menu-tree-row.is-hidden-item .cms-menu-tree-handle {
  background: #e8edef;
  color: #9da9ae;
}