/* ============================================================================
   WrightHaven Homes — Pasture Edge floating "Compare" dock
   ----------------------------------------------------------------------------
   Fixed to the bottom of the viewport by assets/wh-compare-dock.js once one
   or more homes are picked for comparison. Dark card treatment consistent
   with the rest of the Pasture Edge system (#1d1e1e, gold accent, tan hairline).
   ========================================================================== */

.wh-compare-dock {
  position: fixed;
  left: 50%;
  bottom: 20px;
  z-index: 130; /* above section content, below the top ribbon (120) is fine —
                   they never overlap: ribbon lives at the top, dock at the bottom */
  display: flex;
  align-items: center;
  gap: 18px;
  max-width: min(680px, calc(100vw - 32px));
  padding: 12px 16px;
  background: #1d1e1e;
  border: 1px solid rgba(192, 181, 155, 0.32);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  font-family: var(--wh-font-body, "Poppins", sans-serif);
  color: rgba(255, 255, 255, 0.92);
  transform: translate(-50%, calc(100% + 32px));
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.22, 0.72, 0.22, 1), opacity 0.3s ease;
}

.wh-compare-dock.is-visible {
  transform: translate(-50%, 0);
  opacity: 1;
}

.wh-compare-dock__items {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.wh-compare-dock__item {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(192, 181, 155, 0.32);
  flex-shrink: 0;
}

.wh-compare-dock__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.wh-compare-dock__item-name {
  /* Visually hidden but announced — the thumbnail alone isn't enough context. */
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.wh-compare-dock .wh-compare-dock__item-remove {
  appearance: none;
  cursor: pointer;
  position: absolute;
  top: 2px;
  right: 2px;
  width: 16px;
  height: 16px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(20, 20, 20, 0.78);
  color: #ffffff;
  font-size: 12px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wh-compare-dock .wh-compare-dock__item-remove:hover {
  background: #b0563e;
}

.wh-compare-dock__main {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  min-width: 0;
}

.wh-compare-dock__label {
  margin: 0;
  flex: 1;
  min-width: 0;
  font-size: 13px;
  letter-spacing: 0.02em;
}

.wh-compare-dock__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.wh-compare-dock .wh-compare-dock__clear {
  appearance: none;
  cursor: pointer;
  border: 0;
  background: transparent;
  color: var(--wh-tan, #c0b59b);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.wh-compare-dock .wh-compare-dock__clear:hover {
  color: #ffffff;
}

.wh-compare-dock .wh-compare-dock__cta {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  padding: 9px 18px;
  border-radius: 999px;
  background: var(--wh-gold, #9a8c57);
  color: var(--wh-ink, #141414);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background-color 0.2s;
}

.wh-compare-dock .wh-compare-dock__cta:hover {
  background: #b0a468;
}

.wh-compare-dock .wh-compare-dock__cta.is-disabled {
  cursor: not-allowed;
  background: rgba(154, 140, 87, 0.35);
  color: rgba(255, 255, 255, 0.5);
}

@media (prefers-reduced-motion: reduce) {
  .wh-compare-dock {
    transition: none;
  }
}

@media (max-width: 560px) {
  .wh-compare-dock {
    left: 16px;
    right: 16px;
    bottom: 12px;
    max-width: none;
    flex-wrap: wrap;
    transform: translateY(calc(100% + 32px));
  }

  .wh-compare-dock.is-visible {
    transform: translateY(0);
  }

  .wh-compare-dock__main {
    flex-wrap: wrap;
  }

  .wh-compare-dock__label {
    flex: 1 1 100%;
    order: -1;
    margin-bottom: 4px;
  }
}
