/* D1: the front page of meet as a directory.
 *
 * The card does not move. No lift, no scale, no shadow on hover - the board
 * has none, and a directory of people is not the place to invent one. The
 * card is not a link either, so it has no hover state at all; only its
 * button does.
 */

.directory-page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* The same wordmark as the panel bar: it is scoped to .top-bar there, and
   an 18px logo is the size it is drawn at everywhere. */
.directory-bar .wordmark {
  display: flex;
  align-items: baseline;
  column-gap: 8px;
  text-decoration: none;
}

.directory-bar .wordmark img {
  height: 18px;
  width: auto;
}

.directory-bar .wordmark span {
  font: var(--t-body-primary-400);
  color: var(--c-neutral-10);
}

.directory-bar {
  height: 68px;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--c-neutral-2);
}

/* Quiet on purpose: a customer who was sent a link should never be asked for
   a password they cannot have. */
.directory-signin {
  height: 36px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  border-radius: 100px;
  color: var(--c-neutral-11);
  text-decoration: none;
  transition: background-color 200ms ease-in-out, color 200ms ease-in-out;
}

.directory-signin:hover {
  background: var(--c-neutral-1);
  color: var(--c-white);
}

.directory-body {
  flex: 1;
  padding: 48px 40px 0;
  display: flex;
  flex-direction: column;
  row-gap: 28px;
}

.directory-hero {
  max-width: 720px;
  display: flex;
  flex-direction: column;
  row-gap: 12px;
}

.directory-hero h1 {
  margin: 0;
  font: var(--t-h4-300);
  letter-spacing: var(--ls-h4);
}

.directory-hero p {
  margin: 0;
  font: var(--t-body-big-300);
  color: var(--c-neutral-11);
}

.directory-search {
  display: flex;
  align-items: center;
  gap: 16px;
}

.directory-search input {
  width: 420px;
  max-width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1px solid var(--c-neutral-3);
  border-radius: 8px;
  background: transparent;
  color: var(--c-white);
  transition: border-color 200ms ease-in-out;
}

.directory-search input:focus {
  outline: none;
  border-color: var(--c-neutral-8);
}

.directory-count {
  font: var(--t-body-small-300);
  color: var(--c-neutral-9);
}

.directory-rule {
  height: 1px;
  background: repeating-linear-gradient(
    to right,
    var(--c-neutral-3) 0 4px,
    transparent 4px 8px
  );
}

.directory-group {
  display: flex;
  flex-direction: column;
  row-gap: 16px;
}

.directory-heading {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.directory-heading h2 {
  margin: 0;
  font: var(--t-h7-500);
  letter-spacing: var(--ls-h7);
}

.directory-group-count {
  font: var(--t-body-small-400);
  color: var(--c-neutral-9);
}

.directory-group-note {
  font: var(--t-body-small-300);
  color: var(--c-neutral-8);
}

.directory-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  align-items: stretch;
}

/* A team card carries every host name and needs the width. */
.directory-grid-teams {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.directory-card {
  border: 1px solid var(--c-neutral-1200);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  row-gap: 14px;
}

.directory-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.directory-avatar {
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 50%;
  background: var(--c-neutral-2);
  color: var(--c-neutral-11);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: var(--t-body-small-400);
}

.directory-stack {
  display: inline-flex;
}

.directory-stack .directory-avatar {
  width: 38px;
  height: 38px;
  margin-right: -8px;
  box-shadow: 0 0 0 1px var(--c-bg-black);
}

.directory-card-who h3 {
  margin: 0;
  font: var(--t-body-primary-400);
  color: var(--c-white);
  display: flex;
  align-items: center;
  gap: 8px;
}

.directory-card-sub {
  margin: 2px 0 0;
  font: var(--t-body-small-300);
  color: var(--c-neutral-9);
}

.directory-card-blurb {
  margin: 0;
  font: var(--t-body-small-300);
  color: var(--c-neutral-11);
}

.directory-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Pushed down so that buttons line up across a row of unequal cards. */
.directory-card-actions {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.directory-slug {
  font: var(--t-code-400);
  color: var(--c-neutral-8);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.directory-empty {
  margin: 0;
  font: var(--t-body-small-300);
  color: var(--c-neutral-9);
}

@media (max-width: 1100px) {
  .directory-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .directory-bar,
  .directory-body {
    padding-left: 20px;
    padding-right: 20px;
  }

  .directory-grid,
  .directory-grid-teams {
    grid-template-columns: minmax(0, 1fr);
  }

  /* Every action is thumb-sized, and the slug goes: on a phone it is the
     least useful thing on the card. */
  .directory-card-actions .button {
    min-height: 44px;
    flex: 1;
    justify-content: center;
  }

  .directory-slug {
    display: none;
  }
}

/* S11: the listing block in the page editor. */

/* The board draws the fields and the preview side by side on a panel about
   a thousand pixels wide. The editor's form column is not that wide - it has
   the page preview beside it already - so the preview goes underneath. It is
   still live and still on screen while somebody types, which is the point of
   it; a third column at 300px would not be. */
.listing-block {
  display: flex;
  flex-direction: column;
  row-gap: 18px;
}

/* The editor's own switch row, placed in the listing grid. */
.listing-switch {
  /* The same bordered row as "Page is live" and "Transcribe meetings booked
     here", directly above it. */
  margin-top: 4px;
}

.listing-switch h3 {
  margin: 0 0 4px;
  font: var(--t-body-primary-400);
  color: var(--c-white);
}

.listing-switch .fine-print {
  margin: 0;
}

.listing-fields {
  display: flex;
  flex-direction: column;
  row-gap: 18px;
}

.listing-counted {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.listing-preview {
  display: flex;
  flex-direction: column;
  row-gap: 10px;
}

.listing-card {
  /* A preview, not a control: nothing in it is reachable. */
  pointer-events: none;
}

.listing-placeholder {
  border: 1px dashed var(--c-neutral-3);
  border-radius: 12px;
  padding: 28px 20px;
  text-align: center;
  color: var(--c-neutral-9);
}

.listing-placeholder p {
  margin: 0;
}

/* The preview card is a card, not a column: it keeps the width a card has on
   the home page rather than stretching across the form. */
.listing-preview .directory-card,
.listing-placeholder {
  max-width: 360px;
}

/* S1: how a page is marked on the list it lives in. */

.badge-public {
  border: 1px solid var(--c-green);
  color: var(--c-green);
  background: transparent;
}

/* Words rather than a badge: "link only" is the absence of something, and a
   pill would give it the same weight as being public. */
.page-unlisted {
  font: var(--t-body-small-300);
  color: var(--c-neutral-9);
}

/* Opposite the type filter, as the board has it. */
.pages-line {
  text-align: right;
  margin: -8px 0 4px;
}

/* D3: one group at a time on a phone, and the shorter half of the promise. */

.directory-short,
.directory-tabs {
  display: none;
}

@media (max-width: 720px) {
  .directory-long {
    display: none;
  }

  /* The count goes under the field rather than squeezing beside it. */
  .directory-search {
    flex-wrap: wrap;
    gap: 8px;
  }

  .directory-search input {
    width: 100%;
  }

  .directory-short {
    display: block;
  }

  .directory-tabs {
    display: flex;
    padding: 3px;
    border: 1px solid var(--c-neutral-3);
    border-radius: 100px;
  }

  .directory-tab {
    flex: 1;
    min-height: 44px;
    border: none;
    border-radius: 100px;
    background: transparent;
    color: var(--c-neutral-9);
    cursor: pointer;
    transition: background-color 200ms ease-in-out, color 200ms ease-in-out;
  }

  .directory-tab-on {
    background: var(--c-neutral-2);
    color: var(--c-white);
  }

  /* Hidden by the switch rather than by the search: a group with cards in it
     is still there, it is just not the one being looked at. */
  .directory-group-off {
    display: none;
  }

  /* The group heading is what the switch already says. */
  .directory-heading {
    display: none;
  }

  /* Plain text rather than chips: two facts on one line read faster than two
     pills on a narrow card. */
  .directory-chips {
    gap: 0;
  }

  .directory-chips .chip {
    border: none;
    padding: 0;
    background: transparent;
    color: var(--c-neutral-9);
  }

  .directory-chips .chip + .chip::before {
    content: " · ";
  }
}
