/* Let the photo shine (design option A, Nov 9, discover-photo-a-patch.js).
   On the photo: the dots, •••, the sticker they sent and "Name, Age" with
   the badge. The dark fade covers the name line plus 16px. Everything else
   is in the white panel below, on the 4px grid with 16px edges.

   Loaded last on the page (after prompt-cards.css), and the photo rules
   carry .aisle-hero-card or :not(.is-incognito-limited) on top of the
   selectors they replace, so they win over discover-card-a2.css and
   discover-profile.css by specificity as well as by order. A limited
   incognito card or profile keeps its own taller fade and its note on the
   photo (incognito-card.css). */

/* Discover card: the name line alone, 16px above the photo's bottom. */
body:not(.discover-profile-open) .screen.active.discover-deck .aisle-card-wrap.aisle-photo-a > .gm-card-stack.aisle-hero-card:not(.is-incognito-limited) > .aisle-card-overlay.aisle-card-a2 {
  top: auto;
  bottom: 0;
  height: auto;
  min-height: 0;
  max-height: none;
  padding: 0 0 16px;
  row-gap: 0;
}

body:not(.discover-profile-open) .screen.active.discover-deck .aisle-card-wrap.aisle-photo-a > .gm-card-stack.aisle-hero-card:not(.is-incognito-limited) > .aisle-card-overlay.aisle-card-a2 > :is(.gm-badge-line, .aisle-card-name) {
  flex-shrink: 0;
}

/* The fade: 16px of ramp, then the 0.62 band under the 32px name line and
   the 16px below it. */
body:not(.discover-profile-open) .screen.active.discover-deck .aisle-card-wrap.aisle-photo-a > .gm-card-stack.aisle-hero-card:not(.is-incognito-limited) .aisle-card-scrim {
  height: 64px;
  background: linear-gradient(rgba(28, 25, 23, 0) 0, rgba(28, 25, 23, 0.62) 16px, rgba(28, 25, 23, 0.62) 100%);
}

/* The panel: 16px edges, 8px between rows. */
body:not(.discover-profile-open) .screen.active.discover-deck .aisle-card-wrap.aisle-photo-a > .aisle-card-foot {
  padding: 12px 16px 16px;
  gap: 8px;
}

.aisle-panel-head {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  min-width: 0;
}

/* Line 1: "Sent you a sticker · Santa Monica, CA", 13pt secondary. */
.aisle-panel-head > .aisle-panel-meta {
  margin: 0;
  min-width: 0;
  font-family: Outfit, "Pretendard", "Noto Sans KR", system-ui, -apple-system, "Apple SD Gothic Neo", sans-serif;
  font-size: var(--aisle-caption-size, 13px);
  font-weight: var(--aisle-caption-weight, 500);
  line-height: 16px;
  color: var(--rt-muted, #5F5A54);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Line 2: the gold match chip, the mode chip and the prompt chip, at full
   height. */
.aisle-panel-head > .aisle-panel-pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
  min-width: 0;
  max-width: 100%;
  overflow: visible;
}

.aisle-panel-head > .aisle-panel-pills > .score-badge,
.aisle-panel-head > .aisle-panel-pills > .aisle-match-pill,
.aisle-panel-head > .aisle-panel-pills > .liked-you-intent {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  box-sizing: border-box;
  height: 28px;
  margin: 0;
  padding: 0 12px;
  border-radius: 999px;
  font-family: Outfit, "Pretendard", "Noto Sans KR", system-ui, -apple-system, "Apple SD Gothic Neo", sans-serif;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.aisle-panel-head > .aisle-panel-pills > .liked-you-intent {
  box-shadow: inset 0 0 0 1px rgba(31, 122, 77, .35);
}

.aisle-panel-head > .aisle-panel-pills > .prompt-match-chip {
  margin: 0;
}

/* Line 3: the grocery line, two lines at most. public/clamp-words.js ends
   it on a whole word with an ellipsis. */
.aisle-panel-head > .aisle-panel-reason {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  margin: 0;
  min-width: 0;
  max-height: 40px;
  font-family: Outfit, "Pretendard", "Noto Sans KR", system-ui, -apple-system, "Apple SD Gothic Neo", sans-serif;
  font-size: 15px;
  font-weight: 400;
  line-height: 20px;
  color: #1C1917;
  white-space: normal;
  word-break: normal;
  overflow-wrap: normal;
  hyphens: none;
}

/* Line 4: the tag pills, one row, overflow as "+N". */
.aisle-panel-head > .aisle-panel-tags {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  margin: 0;
  min-width: 0;
  overflow: hidden;
}

.aisle-panel-head > .aisle-panel-tags > .aisle-taste-tag,
.aisle-panel-head > .aisle-panel-tags > .aisle-taste-more {
  height: 28px;
  line-height: 28px;
}

/* Photo first (Richard, Nov 12: "I want the profile picture to be the most
   impactful"). At every window width the photo keeps at least half of the
   card area (the space above the tab bar, Pass, the sticker and Like
   included), never less than 180px, and the white panel gives way: it
   scrolls when it is taller than what is left. This is the iPhone app's
   proportion, so the web card and the app card look the same. Before this
   only phones (480px and under) let the panel scroll, so a wider window
   squeezed the photo instead. */
body:not(.discover-profile-open) .screen.active.discover-deck > .aisle-card-wrap.aisle-photo-a > .gm-card-stack.aisle-hero-card {
  min-height: 180px;
  min-height: max(180px, 50%);
}

body:not(.discover-profile-open) .screen.active.discover-deck > .aisle-card-wrap.aisle-photo-a > .aisle-card-foot {
  flex: 0 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  /* Shows that the panel scrolls (design, Nov 12): a soft shade along the
     bottom edge while more is below. The white cover scrolls with the text
     ("local") and reaches the bottom only at the end, so the shade is gone
     when the panel fits or is scrolled to the end. A mask-image fade would
     also fade the panel's own white, so its rounded bottom edge would blur
     into the cream page even when nothing scrolls. */
  background:
    linear-gradient(rgba(255, 255, 255, 0), #fff 60%) center bottom / 100% 24px no-repeat local,
    radial-gradient(farthest-side at 50% 100%, rgba(28, 25, 23, 0.16), rgba(28, 25, 23, 0)) center bottom / 100% 12px no-repeat scroll,
    #fff;
}

/* Undo, Pass, the sticker and Like sit 8px under the card at every window
   width, as in the iPhone app (Richard, Nov 12: "remove more padding between
   the discover card and the Undo, Pass, Star, and Like buttons ... give more
   real estate to the profile picture"). Phones already had no padding on the
   row; wider windows kept the page's old 24px above and below it, so the row
   took 48px more and the photo gave that up. */
body:not(.discover-profile-open) .screen.active.discover-deck > .aisle-card-wrap.aisle-photo-a > .swipe-area {
  padding: 0;
}

/* Short windows (under 500px tall, wider than 480px): aisle.css lets the
   photo shrink there so Pass, the sticker and Like stay above the tab bar.
   Half the card, with no 180px floor (design, Nov 12). */
@media (max-height: 500px) and (min-width: 481px) {
  body:not(.discover-profile-open) .screen.active.discover-deck > .aisle-card-wrap.aisle-photo-a > .gm-card-stack.aisle-hero-card {
    min-height: 50%;
  }
}

/* Full profile from the Discover deck: the same fade, and the panel right
   under the photo. */
.discover-profile-hero.aisle-hero-card.aisle-photo-a:not(.is-incognito-limited) .aisle-card-scrim {
  height: 68px;
  background: linear-gradient(rgba(28, 25, 23, 0) 0, rgba(28, 25, 23, 0.62) 16px, rgba(28, 25, 23, 0.70) 100%);
}

.discover-profile-screen .discover-section.discover-hero-panel {
  padding: 16px;
}

/* Tags clamp-words.js leaves out of the row (the tag CSS sets a display). */
.aisle-panel-head > .aisle-panel-tags > [hidden] {
  display: none !important;
}
