/* Phone chrome: the member lives in the bottom dock, the wordmark sits centred, and
   activity is a heart on the left. v2 adds the centred header; v1 is still pinned in
   the CDN for a week, so the layout link moves to this filename instead of editing v1. */

.mtv-phone-only { display: none; }
.mtv-menu__hamburger { display: none; }
.mtv-notif__heart { display: none; }

@media (max-width: 820px) {
  .mtv-header .mtv-search,
  .mtv-header .mtv-theme-toggle,
  .mtv-header .mtv-phone-hide,
  .mtv-header .mtv-menu { display: none; }

  /* One plain row: MODE! centred, activity pinned to the right edge where the magnifier
     used to sit. The wordmark keeps its own middle track while the icon row spans the full
     width, so pointer-events on the container is what keeps the centred logo clickable. */
  .mtv-header { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
  .mtv-header .mtv-logo { grid-column: 2; grid-row: 1; justify-self: center; }
  .mtv-header .mtv-authnav {
    grid-column: 1 / -1; grid-row: 1; width: 100%;
    margin: 0; justify-content: flex-end; pointer-events: none;
  }
  .mtv-header .mtv-authnav > * { order: 3; pointer-events: auto; }
  .mtv-header .mtv-authnav .mtv-notif { order: 1; }
  .mtv-header .mtv-authnav .mtv-phone-only { order: 2; }

  .mtv-header .mtv-notif .mtv-notif__bell { display: none; }
  .mtv-header .mtv-notif .mtv-notif__heart { display: block; }

  /* A guest signs in from the dock's last slot; in the header those two buttons would
     simply sit on top of the centred wordmark at 320px. */
  .mtv-header .mtv-authnav .mtv-btn { display: none; }

  .mtv-phone-only {
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
  }

  /* The account menu returns as a hamburger, but only on the member's own screens. */
  .mtv-header .mtv-menu.mtv-menu--phone { display: block; }

  .mtv-menu--phone .mtv-menu__trigger {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(0, 69, 116, .16);
    border-radius: 999px;
    background: transparent;
    color: var(--mtv-navy);
    list-style: none;
  }

  .mtv-menu--phone .mtv-menu__trigger::-webkit-details-marker { display: none; }
  .mtv-menu--phone .mtv-avatar--nav,
  .mtv-menu--phone .mtv-menu__chev { display: none; }
  .mtv-menu--phone .mtv-menu__hamburger { display: block; width: 20px; height: 20px; }
  .mtv-menu--phone .mtv-menu__panel {
    left: auto;
    right: 0;
    width: min(300px, calc(100vw - 24px));
    max-height: calc(100vh - 120px);
    overflow-y: auto;
  }

  /* Fifth dock slot: the member's own face, or a person mark until they have one. */
  .mtv-dock__avatar {
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 999px;
    overflow: hidden;
    background: linear-gradient(140deg, var(--mtv-navy), var(--mtv-magenta));
    color: #fff;
    font-size: 10.5px;
    font-weight: 800;
    line-height: 1;
  }

  .mtv-dock__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
  }

  .mtv-dock__account.active .mtv-dock__avatar { box-shadow: 0 0 0 1.5px var(--mtv-magenta); }
}
