/* =====================================================================
 * PDX.Directory — Business Detail Page Enhancements
 * Token-driven styling for the Google Business Profile sections added
 * to /business/{slug}. Every color references --pdx-* variables defined
 * in pdx-base.css; no hardcoded hex.
 * ===================================================================== */

/* ---- Hero photo from Google Places --------------------------------- */
.pdx-gbp-hero {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 1rem;
  background: var(--pdx-brand-50, #f0f9ff);
}
.pdx-gbp-hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.pdx-gbp-hero__credit {
  position: absolute;
  bottom: 0.5rem;
  right: 0.75rem;
  font-size: 0.625rem;
  color: rgb(255 255 255 / 0.85);
  text-shadow: 0 1px 2px rgb(0 0 0 / 0.6);
  pointer-events: none;
}

/* ---- Open / closed pill -------------------------------------------- */
.pdx-open-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.125rem 0.625rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid;
}
.pdx-open-pill--open {
  background: var(--pdx-brand-50, #ecfdf5);
  color: var(--pdx-brand-700, #047857);
  border-color: var(--pdx-brand-200, #a7f3d0);
}
.pdx-open-pill--closed {
  background: rgb(243 244 246);
  color: rgb(75 85 99);
  border-color: rgb(229 231 235);
}
.pdx-open-pill__dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 9999px;
  background: currentColor;
  opacity: 0.85;
}

/* ---- Star row ------------------------------------------------------- */
.pdx-stars {
  display: inline-flex;
  align-items: center;
  gap: 0.125rem;
  color: rgb(245 158 11);
  font-size: 0.875rem;
}
.pdx-stars__count {
  margin-left: 0.375rem;
  color: rgb(75 85 99);
  font-weight: 500;
  font-size: 0.875rem;
}

/* ---- GBP info card grid -------------------------------------------- */
.pdx-gbp-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}
@media (min-width: 480px) {
  .pdx-gbp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 768px) {
  .pdx-gbp-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.pdx-gbp-attr {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.75rem;
  border-radius: 9999px;
  background: rgb(249 250 251);
  border: 1px solid rgb(229 231 235);
  color: rgb(55 65 81);
  font-size: 0.8125rem;
}
.pdx-gbp-attr i {
  color: var(--pdx-brand-600, #059669);
  width: 0.875rem;
  text-align: center;
}

/* ---- Status badge --------------------------------------------------- */
.pdx-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.125rem 0.625rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
}
.pdx-status-badge--good {
  background: var(--pdx-brand-50, #ecfdf5);
  color: var(--pdx-brand-700, #047857);
}
.pdx-status-badge--warning {
  background: rgb(254 243 199);
  color: rgb(146 64 14);
}
.pdx-status-badge--danger {
  background: rgb(254 226 226);
  color: rgb(153 27 27);
}

/* ---- Type chip row ------------------------------------------------- */
.pdx-type-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}
.pdx-type-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.625rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  background: rgb(243 244 246);
  color: rgb(55 65 81);
  border: 1px solid rgb(229 231 235);
}

/* ---- Hours table --------------------------------------------------- */
.pdx-hours-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.375rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
}
.pdx-hours-row--today {
  background: var(--pdx-brand-50, #ecfdf5);
  color: var(--pdx-brand-700, #047857);
  font-weight: 600;
}
.pdx-hours-row--off {
  background: rgb(254 242 242);
  color: rgb(153 27 27);
}
.pdx-hours-row--on {
  background: rgb(249 250 251);
  color: rgb(55 65 81);
}

/* ---- Embedded Google map ------------------------------------------- */
.pdx-gbp-mapframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 280px;
  border: 0;
  border-radius: 0.75rem;
}

/* ---- Reviews -------------------------------------------------------- */
.pdx-review {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem;
  border: 1px solid rgb(229 231 235);
  border-radius: 0.75rem;
  background: white;
}
.pdx-review__head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.pdx-review__avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  object-fit: cover;
  background: rgb(229 231 235);
}
.pdx-review__author {
  font-weight: 600;
  color: rgb(17 24 39);
  font-size: 0.875rem;
  line-height: 1.2;
}
.pdx-review__time {
  font-size: 0.75rem;
  color: rgb(107 114 128);
}
.pdx-review__text {
  font-size: 0.875rem;
  color: rgb(55 65 81);
  line-height: 1.5;
  white-space: pre-line;
}

/* ---- Address copy button ------------------------------------------- */
.pdx-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.125rem 0.5rem;
  border-radius: 0.375rem;
  background: transparent;
  border: 1px solid transparent;
  color: rgb(107 114 128);
  font-size: 0.75rem;
  cursor: pointer;
  transition: background 120ms, color 120ms, border-color 120ms;
}
.pdx-copy-btn:hover,
.pdx-copy-btn:focus-visible {
  background: var(--pdx-brand-50, #ecfdf5);
  color: var(--pdx-brand-700, #047857);
  border-color: var(--pdx-brand-200, #a7f3d0);
  outline: none;
}
.pdx-copy-btn[data-copied="true"] {
  color: var(--pdx-brand-700, #047857);
}

/* ---- Listing-card thumbnail (added in Job 4) ----------------------- */
.pdx-card-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  background: rgb(243 244 246);
}

/* ---- Filter pill (open-now toggle on listings + neighborhood) ------ */
.pdx-filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.875rem;
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 500;
  background: white;
  color: rgb(75 85 99);
  border: 1px solid rgb(229 231 235);
  text-decoration: none;
  transition: background 120ms, color 120ms, border-color 120ms, box-shadow 120ms;
}
.pdx-filter-pill:hover,
.pdx-filter-pill:focus-visible {
  background: var(--pdx-brand-50, #ecfdf5);
  color: var(--pdx-brand-700, #047857);
  border-color: var(--pdx-brand-200, #a7f3d0);
  outline: none;
}
.pdx-filter-pill--active {
  background: var(--pdx-brand-600, #059669);
  color: white;
  border-color: var(--pdx-brand-600, #059669);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.06);
}
.pdx-filter-pill--active:hover,
.pdx-filter-pill--active:focus-visible {
  background: var(--pdx-brand-700, #047857);
  color: white;
  border-color: var(--pdx-brand-700, #047857);
}
.pdx-filter-pill__count {
  font-size: 0.75rem;
  font-weight: 600;
  opacity: 0.8;
}
