/* Discover card, Area 1 option A2. The overlay stack sits in the bottom
   35% of the photo. Taste tags and Our Dish are opt-in. */

.aisle-card-a2 {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  justify-content: flex-end;
  align-items: stretch;
  gap: 6px;
  top: auto;
  bottom: 0;
  height: 35%;
  max-height: 35%;
  padding: 0 0 12px;
  overflow: hidden;
  box-sizing: border-box;
}

/* The phone deck rule on .aisle-card-overlay sets flex-wrap: wrap and
   flex: 0 0 100% on the name. That basis is the overlay's height in a
   column, so the reason, pills, and tags wrap into a clipped second
   column. This selector is one class more specific. */
body:not(.discover-profile-open) .screen.active.discover-deck .gm-card-stack > .aisle-card-overlay.aisle-card-a2 {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: stretch;
  justify-content: flex-end;
  column-gap: 0;
  row-gap: 6px;
  height: 35%;
  max-height: 35%;
  bottom: 0;
  /* aisle.css sets padding: 0 on the phone deck overlay. Without this the
     match and intent pills sit on the photo's bottom edge. 20px matches the
     space under the pills on the expanded profile. */
  padding: 0 0 20px;
  overflow: hidden;
}

body:not(.discover-profile-open) .screen.active.discover-deck .gm-card-stack > .aisle-card-overlay.aisle-card-a2 > .gm-badge-line,
body:not(.discover-profile-open) .screen.active.discover-deck .gm-card-stack > .aisle-card-overlay.aisle-card-a2 > .aisle-card-name {
  flex: 0 1 auto;
  height: auto;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  order: 1;
}

body:not(.discover-profile-open) .screen.active.discover-deck .gm-card-stack > .aisle-card-overlay.aisle-card-a2 > .aisle-card-reason {
  flex: 0 1 auto;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.aisle-card-a2 > .gm-badge-line,
.aisle-card-a2 > .aisle-card-name {
  flex: 0 1 auto;
  height: auto;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  order: 1;
}

.aisle-card-a2 .gm-badge-line {
  flex-wrap: nowrap;
}

.aisle-card-a2 .gm-badge-pair {
  margin-left: 8px;
  gap: 4px;
  flex-shrink: 0;
}

.aisle-card-a2 .gm-name-truncate,
.aisle-card-a2 > .aisle-card-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  font-weight: var(--aisle-title-sm-weight, 700);
  font-size: var(--aisle-title-sm-size, 24px);
  line-height: var(--aisle-title-lh, 1.15);
  letter-spacing: var(--aisle-title-track, -0.4px);
}

.aisle-card-a2 > .aisle-card-reason {
  order: 2;
  margin: 0;
  max-width: 100%;
  min-width: 0;
  font-family: Outfit, "Pretendard", "Noto Sans KR", system-ui, sans-serif;
  font-weight: 400;
  font-size: 15px;
  line-height: 20px;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.aisle-card-a2 > .aisle-card-pills {
  order: 3;
  align-self: flex-start;
  width: auto;
  max-width: 100%;
  margin: 0;
}

.aisle-card-a2 > .aisle-taste-tags {
  order: 4;
  align-self: flex-start;
}

/* Photo (z-index 2 once it has faded in), then this scrim, then the
   overlay text. 0.55 ink over white is about 3.9:1, so the band reaches
   0.62 by 60% — where the name sits — and holds that to the bottom. */
body:not(.discover-profile-open) .screen.active.discover-deck .aisle-card-wrap:has(.aisle-card-a2) .aisle-card-scrim {
  left: 0;
  right: 0;
  bottom: 0;
  height: 45%;
  background: linear-gradient(rgba(28, 25, 23, 0) 0%, rgba(28, 25, 23, 0.62) 60%, rgba(28, 25, 23, 0.62) 100%);
  pointer-events: none;
  z-index: 3;
}

body:not(.discover-profile-open) .screen.active.discover-deck .aisle-card-a2 .aisle-card-name {
  text-shadow: 0 1px 2px rgba(28, 25, 23, 0.45);
}

.aisle-card-a2 > .aisle-card-store,
.aisle-card-a2 > .aisle-card-bio,
.aisle-card-a2 > .aisle-match-reason,
.aisle-card-a2 > .profile-meta,
.aisle-card-a2 > .aisle-overlap-caption,
.aisle-card-a2 > .profile-items-tag,
.aisle-card-a2 > .aisle-chips,
.aisle-card-a2 > .incognito-card-note {
  display: none !important;
}

.aisle-taste-tags {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.aisle-taste-tag,
.aisle-taste-more {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 6px;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: #F7F1E6;
  font-family: Outfit, "Pretendard", "Noto Sans KR", system-ui, sans-serif;
  font-weight: 600;
  font-size: 13px;
  line-height: 26px;
  white-space: nowrap;
}

.aisle-taste-tag { color: #1C1917; }
.aisle-taste-more { color: #1F7A4D; }

.aisle-taste-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #1F7A4D;
  flex: 0 0 auto;
}

.aisle-card-foot {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 12px 14px 14px;
  min-width: 0;
  background: #fff;
  border-radius: 0 0 24px 24px;
  box-sizing: border-box;
}

.aisle-both-kicker {
  display: block;
  margin: 0;
  font-family: Outfit, "Pretendard", "Noto Sans KR", system-ui, -apple-system, "Apple SD Gothic Neo", sans-serif;
  font-weight: var(--aisle-section-weight, 700);
  font-size: var(--aisle-section-size, 12px);
  line-height: 14px;
  letter-spacing: var(--aisle-section-track, 0.06em);
  text-transform: uppercase;
  color: var(--rt-muted, #5F5A54);
}

.aisle-card-foot .aisle-chips,
.aisle-card-foot .profile-items-tag {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
}

/* Area 1 A2: You Both Buy chips are sage pills. The shared .tag rule paints
   cream with !important, which is the page color, so the labels read as
   plain text. This selector is more specific. */
body:not(.discover-profile-open) .screen.active.discover-deck .aisle-card-foot .aisle-chips,
body:not(.discover-profile-open) .screen.active.discover-deck .aisle-card-foot .profile-items-tag {
  display: flex !important;
}

body:not(.discover-profile-open) .screen.active.discover-deck .aisle-card-foot .tag.aisle-chip {
  display: inline-flex !important;
  align-items: center;
  background: var(--aisle-sage, #D7E6D4) !important;
  color: var(--aisle-produce-on-sage, #1A6B43) !important;
  border-radius: 999px !important;
  padding: 6px 12px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  line-height: 18px !important;
}

body:not(.discover-profile-open) .screen.active.discover-deck .aisle-card-foot .tag.aisle-chip.aisle-chip-more {
  background: #F7F1E6 !important;
  color: #1F7A4D !important;
}

/* Area 1 A2 puts the ••• control on the top left and the location pill on
   the top right. The phone deck rules swap those and can pinch the pill. */
body:not(.discover-profile-open) .screen.active.discover-deck .aisle-card-wrap:has(.aisle-card-a2) .profile-card > .aisle-header-menu.aisle-header-menu {
  top: 8px;
  left: 8px;
  right: auto;
}

body:not(.discover-profile-open) .screen.active.discover-deck .aisle-card-wrap:has(.aisle-card-a2) .aisle-city-pill {
  top: 14px;
  right: 14px;
  left: auto;
  width: auto;
  max-width: 60%;
  letter-spacing: normal;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.our-dish {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  background: #D7E6D4;
  border-radius: 14px;
  padding: 10px 12px;
}

.our-dish-pot {
  flex: 0 0 auto;
  color: #1F7A4D;
}

.our-dish-copy {
  flex: 1 1 auto;
  min-width: 0;
}

.our-dish-kicker {
  margin: 0;
  font-family: Outfit, "Pretendard", "Noto Sans KR", system-ui, sans-serif;
  font-weight: 700;
  font-size: 11px;
  line-height: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--aisle-produce-on-sage, #1A6B43);
}

.our-dish-name {
  margin: 2px 0 0;
  font-family: Outfit, "Pretendard", "Noto Sans KR", system-ui, sans-serif;
  font-weight: 600;
  font-size: 15px;
  line-height: 20px;
  color: #1C1917;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.our-dish-recipe {
  flex: 0 0 auto;
  margin: 0 0 0 auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: #C9362A;
  font-family: Outfit, "Pretendard", "Noto Sans KR", system-ui, sans-serif;
  font-weight: 600;
  font-size: 15px;
  line-height: 20px;
  cursor: pointer;
}

/* Photo above the white panel at every window width. These rules used to
   live only in the 480px query. A desktop window is wider than 480px even
   though .app is a 480px column, so the desktop deck keeps the photo stack
   absolute (top: 0; bottom: 88px) and this panel, in normal flow, stays at
   the wrap's top. The photo's 24px cutouts then show the panel's square
   white corners. */
body:not(.discover-profile-open) .screen.active.discover-deck > .aisle-card-wrap:has(.aisle-card-a2) {
  display: flex;
  flex-direction: column;
}

body:not(.discover-profile-open) .screen.active.discover-deck > .aisle-card-wrap:has(.aisle-card-a2) > .gm-card-stack {
  position: relative;
  inset: auto;
  flex: 1 1 0;
  min-height: 0;
  height: auto;
  overflow: hidden;
  margin-bottom: 0;
  border-radius: 24px 24px 0 0;
}

body:not(.discover-profile-open) .screen.active.discover-deck .aisle-card-wrap:has(.aisle-card-a2) .gm-card-control,
body:not(.discover-profile-open) .screen.active.discover-deck .aisle-card-wrap:has(.aisle-card-a2) .photo-frame,
body:not(.discover-profile-open) .screen.active.discover-deck .aisle-card-wrap:has(.aisle-card-a2) .photo-strip {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

body:not(.discover-profile-open) .screen.active.discover-deck > .aisle-card-wrap:has(.aisle-card-a2) > .swipe-area {
  position: relative;
  left: auto;
  right: auto;
  bottom: auto;
  height: auto;
  margin: 8px 0 0;
  transform: none;
}

@media (max-width: 480px) {
  body:not(.discover-profile-open) .screen.active.discover-deck .gm-card-stack > .aisle-card-a2 {
    bottom: 0;
    height: 35%;
    max-height: 35%;
  }

  body:not(.discover-profile-open) .screen.active.discover-deck .aisle-card-foot .aisle-chips,
  body:not(.discover-profile-open) .screen.active.discover-deck .aisle-card-foot .profile-items-tag {
    display: flex !important;
  }
}

@media (max-height: 500px) and (min-width: 481px) {
  body:not(.discover-profile-open) .screen.active.discover-deck .gm-card-stack > .aisle-card-a2,
  body:not(.discover-profile-open) .screen.active.discover-deck .gm-card-stack > .aisle-card-a2 > .gm-badge-line {
    display: flex;
    max-height: 35%;
  }

  body:not(.discover-profile-open) .screen.active.discover-deck .gm-card-stack .aisle-card-a2 .aisle-card-name {
    position: static;
    left: auto;
    right: auto;
    bottom: auto;
    width: auto;
  }

  body:not(.discover-profile-open) .screen.active.discover-deck > .aisle-card-wrap:has(.aisle-card-a2) > .swipe-area {
    position: relative;
    bottom: auto;
    transform: none;
  }
}
