/* Metra Hub: what the hub adds to the browser remote's look (style.css,
   loaded first). Same tokens; nothing here restyles a shared screen. */

/* ------------------------------------------------------------- sign-in */

.hub-input { width: 100%; height: 60px; padding: 0 18px; border-radius: 18px; border: 1px solid var(--bord); background: var(--surface); color: var(--ink); font-size: 19px; }
.hub-input::placeholder { color: var(--i45); opacity: 1; }
.hub-input:focus { outline: none; border-color: var(--mint); box-shadow: 0 0 0 4px rgba(111, 216, 192, .16); }
.hub-links { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.hub-dev { padding: 10px 14px; border-radius: 12px; border: 1px dashed var(--rule2); font-size: 14px; color: var(--i75); }

/* -------------------------------------------------------------- frame */

/* Six tabs and two pills (the phone, the account) share the top bar, so the
   tabs sit after the brand instead of in the middle of the bar, and each
   part gives way in turn as the window narrows. Below 860 px the tabs are
   along the bottom edge, as on the remote. */
@media (min-width: 860px) {
  .tabs { left: calc(max(0px, (100vw - 1344px) / 2) + var(--pad) + 270px); transform: none; }
  /* The phone's line: its short words until there is room for the long ones. */
  #status .status .long { display: none; }
  #status .status .short { display: inline; }
}
@media (min-width: 1500px) {
  #status .status .long { display: inline; }
  #status .status .short { display: none; }
}
@media (min-width: 860px) and (max-width: 1399px) {
  .tab .icon { display: none; }
}
@media (min-width: 860px) and (max-width: 1099px) {
  .brand-word { display: none; }
  .tabs { left: calc(var(--pad) + 64px); }
}
.status .long { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.hub-invites { padding-bottom: 0; display: flex; flex-direction: column; gap: 10px; max-width: 1240px; }
.hub-invites + .manage .screen { padding-top: 16px; }
.hub-invite { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; border-color: rgba(111, 216, 192, .38); background: rgba(111, 216, 192, .07); }
.hub-invite p { font-size: 15px; line-height: 1.45; }
.hub-invite-actions { display: flex; gap: 10px; }

/* ----------------------------------------------------------- settings */

.hub-settings { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; align-items: start; }
.hub-col { display: flex; flex-direction: column; gap: 28px; min-width: 0; }
.hub-section { display: flex; flex-direction: column; gap: 10px; }
.hub-section > .section-label { margin: 6px 4px 0; }
.hub-section > .footnote { padding: 0 4px; }
.hub-left { align-self: flex-start; }
.hub-person { flex-wrap: wrap; }
.hub-person-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hub-person-actions { display: flex; align-items: center; gap: 10px; flex: none; }
@media (min-width: 980px) {
  .hub-settings { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; }
}

/* A narrow window: a row's label and its control stack instead of pushing
   the page wider than the screen. */
.hub-col, .hub-section { min-width: 0; }
.hub-settings .frow { flex-wrap: wrap; row-gap: 8px; }
.hub-settings .frow-label { white-space: normal; min-width: 0; overflow-wrap: anywhere; }
.hub-settings .segments { flex: none; }
.hub-person-name { flex: 1 1 180px; }

/* ------------------------------------------ the account beside the remote */

/* "Sign in", where the account's pill goes once signed in. */
.status.hub-signin { color: var(--mint); font-weight: 600; }
.hub-acct-mark { display: none; color: var(--i75); }
#account .status[data-tone="warn"] .hub-acct-mark { color: var(--warn); }
.hub-pair-extra { margin-top: 6px; }
.hub-legal .link { display: inline; padding: 0; font-size: inherit; text-decoration: underline; text-underline-offset: 2px; }
.hub-pair-extra .link { padding: 0 2px; font-size: inherit; }
.hub-remote-door { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.hub-wrap { display: block; }
@media (max-width: 859px) {
  /* A narrow window: the account's pill is a mark and an arrow, so it is not
     taken for the phone's (a dot and an arrow) beside it. */
  #account .status .long, #account .status .short { display: none; }
  #account .status .status-dot { display: none; }
  #account .status .hub-acct-mark { display: inline-flex; }
  #account .status.hub-signin { font-size: 14px; }
}

/* -------------------------- the connected phone's settings, in Settings */

/* The remote's own Settings screen, set into the account's: its page title
   and its page padding are the account screen's, so both are taken off. */
.hub-phone-slot:empty { display: none; }
.hub-phone-settings { display: flex; flex-direction: column; gap: 10px; margin-bottom: 36px; padding-bottom: 32px; border-bottom: 1px solid var(--rule2); }
.hub-phone-settings > .section-label { margin: 6px 4px 0; color: var(--mint); }
.hub-phone-settings > .footnote { padding: 0 4px; margin-bottom: 8px; }
.hub-phone-settings .manage-head { display: none; }
.hub-phone-settings .screen { padding: 0; max-width: none; min-height: 0; margin: 0; }
.hub-phone-settings .state.gate { padding: 24px 0; min-height: 0; }
