/* Public household showcase — uses /css/planti-tokens.css */

body.planti-showcase {
  margin: 0;
  min-height: 100vh;
  background: var(--planti-surface);
  color: var(--planti-text);
  font-family: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(43, 87, 23, 0.18);
}

body.planti-showcase a {
  color: var(--planti-link);
}

body.planti-showcase a:hover {
  color: var(--planti-primary-600);
}

#showcase-root {
  box-sizing: border-box;
  max-width: 72rem;
  margin: 0 auto;
  padding: 1.25rem 1rem 2.5rem;
  container-type: inline-size;
  container-name: showcase;
}

#showcase-status {
  margin: 0;
  color: var(--planti-text-muted);
  font-size: 1rem;
  line-height: 1.5;
}

#showcase-status.showcase-status--error {
  color: #9a3412;
}

.showcase-header {
  margin: 0 0 1rem;
}

.showcase-header-title-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.showcase-header-title-block {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.showcase-household-avatar {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--planti-natural-200);
  border: 1px solid var(--planti-natural-200);
}

.showcase-cover-inline {
  width: 4.25rem;
  height: 4.25rem;
  border-radius: 0.75rem;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--planti-natural-200);
  border: 1px solid var(--planti-natural-200);
}

.showcase-cover-line {
  margin: 0.5rem 0 0;
  font-size: 0.9375rem;
  line-height: 1.45;
  color: var(--planti-text-muted);
  max-width: 42rem;
}

.showcase-title {
  margin: 0;
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--planti-text);
}

.showcase-subtitle {
  margin: 0.35rem 0 0;
  font-size: 0.9375rem;
  line-height: 1.45;
  color: var(--planti-text-muted);
}

.showcase-plants {
  margin: 0;
}

.showcase-group-toolbar {
  margin: 0 0 1.25rem;
}

.showcase-group-fieldset {
  margin: 0;
  padding: 0;
  border: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
}

.showcase-group-legend {
  padding: 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--planti-text);
  float: none;
  width: 100%;
}

.showcase-group-option {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.875rem;
  color: var(--planti-text);
  cursor: pointer;
}

.showcase-group-option input {
  margin: 0;
  accent-color: var(--planti-primary-600);
}

.showcase-groups-host {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.showcase-group-section {
  margin: 0;
}

.showcase-group-heading {
  margin: 0 0 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 1rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--planti-text);
}

.showcase-group-heading-title {
  font-weight: 700;
}

/* Scientific / taxon line under localized species name when grouping by species */
.showcase-group-heading-sub {
  font-weight: 400;
  font-size: 0.88rem;
  font-style: italic;
  color: var(--planti-text-muted);
  line-height: 1.35;
  letter-spacing: 0;
}

/*
 * Grid: `auto-fill` + `minmax(..., 1fr)` keeps one column width for the whole layout so
 * every card matches; the last row may leave empty column(s) on the right (no stretching
 * odd rows to different widths).
 */
.showcase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.showcase-grid > li {
  box-sizing: border-box;
  min-width: 0;
}

@media (min-width: 640px) {
  .showcase-grid {
    gap: 1.25rem;
    grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
  }
}

/*
 * Below ~25rem content width: force two equal columns and scale card chrome down.
 */
@container showcase (max-width: 25rem) {
  .showcase-grid {
    gap: 0.5rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .showcase-grid > li {
    min-width: 0;
  }

  .showcase-card-body {
    padding: 0.5rem 0.45rem 0.55rem;
  }

  .showcase-card-name {
    font-size: 0.8125rem;
  }

  .showcase-card-meta {
    font-size: 0.6875rem;
    line-height: 1.3;
  }
}

/* No container-query support: same intent for very narrow viewports */
@supports not (container-type: inline-size) {
  @media (max-width: 24rem) {
    .showcase-grid {
      gap: 0.5rem;
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .showcase-grid > li {
      min-width: 0;
    }

    .showcase-card-body {
      padding: 0.5rem 0.45rem 0.55rem;
    }

    .showcase-card-name {
      font-size: 0.8125rem;
    }

    .showcase-card-meta {
      font-size: 0.6875rem;
      line-height: 1.3;
    }
  }
}

.showcase-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 1px solid var(--planti-natural-200);
  border-radius: 0.75rem;
  background: #fff;
  overflow: hidden;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
  transition:
    box-shadow 0.18s ease,
    border-color 0.18s ease;
}

.showcase-card:hover {
  border-color: var(--planti-primary-200);
  box-shadow: 0 8px 28px rgba(32, 30, 25, 0.1);
}

.showcase-card:focus-visible {
  outline: 3px solid var(--planti-primary-200);
  outline-offset: 2px;
}

/* Square thumb: padding-bottom keeps height when there is no <img> (empty flex + aspect-ratio can collapse). */
.showcase-card-thumb-wrap {
  position: relative;
  width: 100%;
  flex-shrink: 0;
  height: 0;
  padding-bottom: 100%;
  background: var(--planti-surface-subtle);
  overflow: hidden;
}

.showcase-card-thumb,
.showcase-card-thumb-placeholder {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.showcase-card-thumb {
  display: block;
  object-fit: cover;
}

.showcase-card-thumb-placeholder {
  display: block;
  box-sizing: border-box;
  background:
    radial-gradient(
      circle at 50% 42%,
      rgba(32, 30, 25, 0.07) 0%,
      transparent 52%
    ),
    linear-gradient(
      155deg,
      var(--planti-surface-subtle) 0%,
      var(--planti-natural-200) 100%
    );
}

.showcase-card-body {
  padding: 0.75rem 0.85rem 0.85rem;
}

.showcase-card-name {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--planti-text);
}

.showcase-card-meta {
  margin: 0.25rem 0 0;
  font-size: 0.8125rem;
  line-height: 1.35;
  color: var(--planti-text-muted);
}

.showcase-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  border: 0;
  margin: 0;
  width: 100%;
  height: 100%;
  background: rgba(32, 30, 25, 0.45);
  cursor: pointer;
}

.showcase-modal-backdrop[hidden] {
  display: none;
}

/* Tap any zoomable image (hero, plant modal, bloom photos) for fullscreen viewer */
.showcase-image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  border: 0;
  margin: 0;
  background: rgba(32, 30, 25, 0.92);
  cursor: pointer;
}

.showcase-image-lightbox[hidden] {
  display: none;
}

.showcase-image-lightbox-close {
  position: fixed;
  top: 0.45rem;
  right: 0.45rem;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: none;
  border-radius: 0.5rem;
  background: rgba(252, 248, 245, 0.94);
  color: var(--planti-text);
  font: inherit;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.showcase-image-lightbox-close:hover {
  background: var(--planti-natural-200);
}

.showcase-image-lightbox-close:focus-visible {
  outline: 3px solid var(--planti-primary-200);
  outline-offset: 2px;
}

.showcase-image-lightbox-inner {
  display: flex;
  max-width: min(100vw - 2rem, 100%);
  max-height: min(100vh - 2rem, 100%);
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.showcase-image-lightbox-img {
  max-width: 100%;
  max-height: min(92vh, 100vh);
  width: auto;
  height: auto;
  object-fit: contain;
  pointer-events: auto;
  cursor: default;
  border-radius: 0.35rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.showcase-image--zoomable {
  cursor: pointer;
}

.showcase-image--zoomable:focus-visible {
  outline: 3px solid var(--planti-primary-200);
  outline-offset: 2px;
}

@media (min-width: 640px) {
  .showcase-modal-backdrop {
    align-items: center;
    padding: 1.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .showcase-card {
    transition: none;
  }
}

.showcase-modal-panel {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  max-width: 28rem;
  max-height: min(92vh, 44rem);
  overflow: auto;
  background: var(--planti-surface);
  border-radius: 1rem 1rem 0 0;
  box-shadow: 0 -8px 40px rgba(32, 30, 25, 0.18);
  cursor: default;
  text-align: left;
}

@media (min-width: 640px) {
  .showcase-modal-panel {
    border-radius: 1rem;
    box-shadow: 0 16px 48px rgba(32, 30, 25, 0.2);
  }
}

.showcase-modal-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: none;
  border-radius: 0.5rem;
  background: rgba(252, 248, 245, 0.92);
  color: var(--planti-text);
  font: inherit;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.showcase-modal-close:hover {
  background: var(--planti-natural-200);
}

.showcase-modal-close:focus-visible {
  outline: 3px solid var(--planti-primary-200);
  outline-offset: 2px;
}

.showcase-modal-media-wrap {
  background: var(--planti-surface-subtle);
}

.showcase-modal-media-wrap--single {
  aspect-ratio: 4 / 3;
}

.showcase-modal-media-wrap--gallery {
  aspect-ratio: auto;
  padding: 0.5rem 0 0;
}

.showcase-modal-media {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.showcase-modal-gallery {
  display: flex;
  flex-direction: row;
  gap: 0.5rem;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 0 0.25rem 0.35rem;
  max-height: 16rem;
}

.showcase-modal-gallery-img {
  flex: 0 0 auto;
  width: min(78vw, 18rem);
  height: 14rem;
  object-fit: cover;
  border-radius: 0.5rem;
  scroll-snap-align: start;
  background: var(--planti-natural-100);
}

.showcase-modal-body {
  padding: 1rem 1.25rem 1.35rem;
}

.showcase-modal-title {
  margin: 0;
  padding-right: 2.75rem;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--planti-text);
}

.showcase-modal-meta {
  margin: 0.35rem 0 0;
  font-size: 0.9375rem;
  line-height: 1.45;
  color: var(--planti-text-muted);
}

.showcase-modal-extra {
  margin: 0.85rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.showcase-modal-section {
  margin: 0;
}

.showcase-modal-section-title {
  margin: 0 0 0.4rem;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--planti-text-muted);
}

.showcase-modal-note {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--planti-text);
  white-space: pre-wrap;
}

.showcase-modal-bloom-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.showcase-modal-bloom-item {
  margin: 0 0 0.65rem;
}

.showcase-modal-bloom-item:last-child {
  margin-bottom: 0;
}

.showcase-modal-bloom-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.45;
  color: var(--planti-text);
}

.showcase-modal-bloom-date {
  flex-shrink: 0;
}

.showcase-modal-bloom-sep {
  color: var(--planti-text-muted);
  font-weight: 500;
}

.showcase-modal-bloom-colors {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

.showcase-modal-bloom-swatch {
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 999px;
  border: 1px solid rgba(32, 30, 25, 0.2);
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.showcase-modal-bloom-color-fallback {
  font-size: 0.8125rem;
  color: var(--planti-text-muted);
}

.showcase-modal-bloom-images {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.45rem 0 0;
}

.showcase-modal-bloom-image {
  width: 5rem;
  height: 5rem;
  object-fit: cover;
  border-radius: 0.45rem;
  border: 1px solid var(--planti-natural-200);
  background: var(--planti-surface-subtle);
}

.showcase-modal-bloom-note {
  margin: 0.3rem 0 0;
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--planti-text-muted);
  white-space: pre-wrap;
}

.showcase-modal-member {
  margin: 0 0 0.85rem;
  padding: 0.75rem 0.8rem;
  border-radius: 0.65rem;
  border: 1px solid var(--planti-natural-200);
  background: #fffefb;
}

.showcase-modal-member:last-child {
  margin-bottom: 0;
}

.showcase-modal-member-head {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.65rem;
  margin: 0 0 0.75rem;
}

.showcase-modal-member-id {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
  flex: 1;
}

.showcase-modal-member-avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--planti-natural-200);
}

/* Mr Rain — matches app `UserAvatar` + `CustomIcons.cloud_rain` (no photo). */
.showcase-modal-mr-rain-avatar {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: transparent;
  color: var(--planti-text);
}

.showcase-modal-mr-rain-svg {
  display: block;
  width: 1.5rem;
  height: 1.5rem;
}

.showcase-modal-member-name {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--planti-text);
}

.showcase-modal-member-rollup {
  margin: 0;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  line-height: 1.35;
  text-transform: uppercase;
  color: var(--planti-text-muted);
}

.showcase-modal-chore-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: stretch;
}

.showcase-modal-chore-pill {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-width: 3.6rem;
  max-width: 5rem;
  padding: 0.4rem 0.35rem 0.3rem;
  border-radius: 0.55rem;
  border: 1.5px solid var(--chore-pill-border, #78716c);
  background: #fffefb;
  color: var(--chore-pill-fg, #44403c);
}

.showcase-modal-chore-pill-num {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  color: inherit;
}

.showcase-modal-chore-pill-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.3rem;
  width: 1.55rem;
  height: 1.55rem;
  color: inherit;
}

.showcase-modal-chore-icon {
  display: block;
  width: 100%;
  height: 100%;
}

/* Chore accent = Flutter FunctionalColorsLight.task* (lib/ui/common/theme/colors.dart) */

.showcase-modal-chore-pill--watering {
  --chore-pill-border: #219ee4;
  --chore-pill-fg: #219ee4;
}

.showcase-modal-chore-pill--misting {
  --chore-pill-border: #8387e3;
  --chore-pill-fg: #8387e3;
}

.showcase-modal-chore-pill--fertilizing {
  --chore-pill-border: #7db264;
  --chore-pill-fg: #7db264;
}

.showcase-modal-chore-pill--fertilizingHighNitrogen {
  --chore-pill-border: #7db264;
  --chore-pill-fg: #7db264;
}

.showcase-modal-chore-pill--fertilizingHighPhosphorus {
  --chore-pill-border: #7db264;
  --chore-pill-fg: #7db264;
}

.showcase-modal-chore-pill--rotating {
  --chore-pill-border: #e5a23d;
  --chore-pill-fg: #e5a23d;
}

.showcase-modal-chore-pill--repotting {
  --chore-pill-border: #c37d55;
  --chore-pill-fg: #c37d55;
}

.showcase-modal-chore-pill--trimming {
  --chore-pill-border: #929d79;
  --chore-pill-fg: #929d79;
}

.showcase-modal-chore-pill--dusting {
  --chore-pill-border: #c0ae93;
  --chore-pill-fg: #c0ae93;
}

.showcase-modal-chore-pill--treatment {
  --chore-pill-border: #b8860b;
  --chore-pill-fg: #b8860b;
}

.showcase-store-cta {
  margin: 2rem 0 0;
  padding: 1rem 0 0;
  border-top: 1px solid var(--planti-natural-200);
}

.showcase-store-cta-title {
  margin: 0 0 0.75rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--planti-text);
  text-align: center;
}

.showcase-store-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  justify-content: center;
  align-items: center;
}

.showcase-store-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.5rem;
  padding: 0.45rem 1rem;
  border-radius: 0.5rem;
  border: 1px solid var(--planti-natural-200);
  background: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--planti-text);
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.showcase-store-link:hover {
  border-color: var(--planti-primary-400);
  color: var(--planti-primary-700);
}
