/* Monavista regional pages: compact mobile header and category accordion. */
@media (max-width: 720px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  .header .header__main:has(.city-header-brand) {
    box-sizing: border-box;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 72px;
    margin: 0 !important;
    padding: 9px 12px !important;
    gap: 10px;
    align-items: center;
  }

  .header .header__main:has(.city-header-brand) .house-ad--header {
    display: none !important;
  }

  .header .city-header-brand {
    display: grid !important;
    grid-template-columns: 9px minmax(0, 1fr);
    min-width: 0;
    max-width: 100%;
    gap: 8px;
    align-items: center;
  }

  .header .city-header-brand > span:last-child {
    display: block;
    min-width: 0;
  }

  .header .city-header-brand strong,
  .header .city-header-brand small {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .header .city-header-brand strong {
    font-size: clamp(17px, 5vw, 20px) !important;
    line-height: 1.05 !important;
  }

  .header .city-header-brand small {
    margin-top: 4px;
    color: #77736d;
    font-size: 10px !important;
    line-height: 1.15 !important;
  }

  .header .header__main:has(.city-header-brand) .header-actions {
    display: flex !important;
    width: auto !important;
    min-width: 0;
    margin: 0 !important;
    align-items: center;
  }

  .header .header__main:has(.city-header-brand) .header-territories {
    display: none !important;
  }

  .header .header__main:has(.city-header-brand) .city-switcher {
    box-sizing: border-box;
    display: inline-flex !important;
    width: 108px !important;
    min-width: 108px !important;
    max-width: 108px !important;
    min-height: 40px !important;
    margin: 0 !important;
    padding: 0 10px !important;
    justify-content: center;
    overflow: hidden;
    border-radius: 10px !important;
    font-size: 12px !important;
    line-height: 1 !important;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  main > .topics,
  main .topics.mv-mobile-topics {
    position: relative;
    overflow: visible !important;
    border-top: 1px solid #e5e1dc;
    border-bottom: 1px solid #e5e1dc;
    background: #fff;
  }

  .topics-mobile-toggle {
    box-sizing: border-box;
    display: flex !important;
    width: 100%;
    min-height: 52px;
    padding: 0 18px;
    align-items: center;
    justify-content: space-between;
    color: #181716;
    border: 0;
    background: #fff;
    font: 800 14px/1 Arial, sans-serif;
    text-align: left;
    cursor: pointer;
  }

  .topics-mobile-toggle::after {
    content: '+';
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    color: #be252b;
    border: 1px solid #ded9d3;
    border-radius: 50%;
    font-size: 21px;
    font-weight: 400;
    line-height: 1;
  }

  .topics-mobile-toggle[aria-expanded='true']::after {
    content: '−';
  }

  .topics.mv-mobile-topics > .topics__inner {
    display: none !important;
    box-sizing: border-box;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 0 !important;
    padding: 0 12px 12px !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    overflow: visible !important;
    white-space: normal !important;
  }

  .topics.mv-mobile-topics.is-open > .topics__inner {
    display: grid !important;
  }

  .topics.mv-mobile-topics .topic {
    box-sizing: border-box;
    display: flex !important;
    width: 100%;
    min-width: 0;
    min-height: 40px;
    margin: 0 !important;
    padding: 8px 10px !important;
    align-items: center;
    overflow: hidden;
    border: 1px solid #e5e1dc;
    border-radius: 8px;
    font-size: 11px !important;
    line-height: 1.15 !important;
    white-space: normal !important;
  }
}

@media (max-width: 370px) {
  .header .header__main:has(.city-header-brand) {
    padding-inline: 9px !important;
    gap: 7px;
  }

  .header .header__main:has(.city-header-brand) .city-switcher {
    width: 96px !important;
    min-width: 96px !important;
    max-width: 96px !important;
  }

  .topics.mv-mobile-topics > .topics__inner {
    grid-template-columns: 1fr;
  }
}
