/*
 * Basic styling for the Remodeling Estimator prototype.
 *
 * The CSS focuses on providing a clean, premium feel with a semi-transparent
 * glass-like container, subtle shadows, and clear interactive states. Cards
 * respond to hover and selection, and the cart drawer slides in smoothly
 * from the right. The layout is responsive to smaller screens.
 */

/* Reset default margin and ensure full-height layout */
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: Arial, Helvetica, sans-serif;
  box-sizing: border-box;
}

/* Hero covers the full viewport and provides a neutral gradient background.  */
.hero {
  position: relative;
  width: 100%;
  min-height: 100vh;
  height: auto;
  background: linear-gradient(135deg, #f5f5f5, #e0e0e0);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  overflow-x: hidden;
  /* Smoothly transition background images when the room changes */
  transition: background-image 0.6s ease;
}

/*
 * Apply a global dark tint over the full background image so the
 * entire experience has the same transparent black treatment used
 * on the menu cards.
 */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.70);
  pointer-events: none;
  z-index: 0;
}

/* The main estimator shell with a glass effect */
/*
 * App container
 *
 * The estimator shell spans the full width up to 1300px with
 * consistent spacing around all sides. The shell background is
 * fully transparent so only nested sections provide visible fills.
 */
.app-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1300px;
  margin-top: 0;
  background: transparent;
  border-radius: 12px;
  /* Keep side/bottom spacing while removing top gap */
  padding: 0 20px 20px;
  /* Remove any visible outer border/glow from the 20px shell */
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/*
 * Layout containers for the estimator. The top bar (price + cart)
 * sits in its own container with a distinct background and no padding.
 * The card content container holds breadcrumbs, cards, and the price
 * area with its own background and internal padding.
 */
/*
 * Price + cart container
 *
 * This row hosts the running total and cart trigger. The container
 * uses a dark translucent background with no internal padding to
 * align flush with the shell. Rounded top corners are maintained.
 */
.price-cart-container {
  background: transparent;
  padding: 0;
  border-radius: 0;
}

.card-content-container {
  /* Remove per-container tint so global hero overlay provides the uniform darkening */
  background: transparent;
  /* Keep body visually flush with the top bar */
  margin-top: 0;
  padding: 20px;
  border-radius: 0 0 12px 12px;
}

/* Top bar styles */
/*
 * Top bar
 *
 * Contains the running total and cart trigger. It sits inside
 * the price-cart-container and inherits the dark background. To
 * avoid extra margins, the bottom margin is removed. Internal
 * padding on all sides ensures the content has breathing room.
 */
.top-bar {
  display: flex;
  flex-direction: column;
  gap: 6px;
  /* Let the container dictate the background; avoid adding another layer */
  background: transparent;
  /* Add 10px extra on top/right/left while keeping bottom spacing unchanged */
  padding: 20px 20px 10px;
  border-radius: 8px;
  margin-bottom: 0;
  box-shadow: none;
  /* Ensure the top bar is above content and overlay so the cart trigger remains clickable */
  position: relative;
  z-index: 95;
}

.top-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  width: 100%;
  gap: 12px;
}

.breadcrumbs {
  justify-self: start;
}

.top-cart {
  justify-self: end;
}


.cart-total .cart-total-value {
  display: inline-block;
}

.cart-total .cart-total-value.total-flash {
  animation: running-total-flash 260ms ease-out;
}

@keyframes running-total-flash {
  0% {
    transform: scale(1);
    filter: brightness(1);
    text-shadow: 0 0 0 rgba(255, 255, 255, 0);
  }
  45% {
    transform: scale(1.04);
    filter: brightness(1.25);
    text-shadow: 0 0 14px rgba(255, 255, 255, 0.9);
  }
  100% {
    transform: scale(1);
    filter: brightness(1);
    text-shadow: 0 0 0 rgba(255, 255, 255, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .cart-total .cart-total-value,
  .cart-total .cart-total-value.total-flash {
    animation: none;
    transition: none;
  }

  .card-grid.card-load-enter.is-loaded.card-exit .card {
    transform: none;
    filter: none;
    transition:
      opacity 0.01ms linear,
      transform 0.01ms linear,
      filter 0.01ms linear;
  }
}

.top-cart {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  /* Elevate the cart trigger above other interactive elements */
  z-index: 96;
  /* Match cart trigger color to the dark header */
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 0;
  padding: 8px 14px;
  background: rgba(0, 0, 0, 0.38);
  transition: background-color 0.2s ease, transform 0.2s ease;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.cart-trigger-total {
  font-size: 20px;
  font-weight: bold;
  line-height: 1;
  color: #ffffff;
  white-space: nowrap;
  user-select: none;
}

.cart-trigger-total.total-flash {
  animation: running-total-flash 260ms ease-out;
}

.top-cart:hover {
  background: rgba(0, 0, 0, 0.52);
  transform: translateY(-1px);
}

/* Breadcrumb styling */
.breadcrumbs {
  --breadcrumb-row-height: 46px;
  margin: 0;
  font-size: 20px;
  color: #ffffff;
  min-height: var(--breadcrumb-row-height);
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  overflow: visible;
  text-align: center;
}

.breadcrumbs > span,
.breadcrumb-new-inner > span {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  height: var(--breadcrumb-row-height);
}

.breadcrumbs > span:not(:last-child)::after,
.breadcrumb-new-inner > span:not(:last-child)::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin: 0 8px;
  border-top: 2px solid rgba(255, 255, 255, 0.9);
  border-right: 2px solid rgba(255, 255, 255, 0.9);
  transform: rotate(45deg);
  color: rgba(255, 255, 255, 0.65);
}

.breadcrumb-new {
  display: inline-flex;
  overflow: hidden;
  width: 0;
  opacity: 0;
  transform: translateX(-10px);
  animation: breadcrumb-grow 420ms cubic-bezier(.16,1,.3,1) forwards;
}

.breadcrumb-new-inner {
  display: inline-flex;
  align-items: center;
}

.breadcrumb-old {
  display: inline-flex;
  overflow: hidden;
  width: var(--breadcrumb-shrink-width, 420px);
  opacity: 1;
  transform: translateX(0);
}

.breadcrumb-old.is-shrinking {
  animation: breadcrumb-shrink 420ms cubic-bezier(.16,1,.3,1) forwards;
}

.breadcrumb-old-inner {
  display: inline-flex;
  align-items: center;
}

.breadcrumb-old-inner > span {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  height: var(--breadcrumb-row-height);
}

.breadcrumb-old-inner > span:not(:last-child)::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin: 0 8px;
  border-top: 2px solid rgba(255, 255, 255, 0.9);
  border-right: 2px solid rgba(255, 255, 255, 0.9);
  transform: rotate(45deg);
  color: rgba(255, 255, 255, 0.65);
}

@keyframes breadcrumb-shrink {
  from {
    width: var(--breadcrumb-shrink-width, 420px);
    opacity: 1;
    transform: translateX(0);
  }
  to {
    width: 0;
    opacity: 0;
    transform: translateX(-10px);
  }
}

@keyframes breadcrumb-grow {
  from {
    width: 0;
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    width: var(--breadcrumb-grow-width, 420px);
    opacity: 1;
    transform: translateX(0);
  }
}

.breadcrumb-home {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: var(--breadcrumb-row-height);
  color: #ffffff;
}

.breadcrumb-static-end::after {
  display: none !important;
}

.breadcrumb-old::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin: 0 8px;
  border-top: 2px solid rgba(255, 255, 255, 0.9);
  border-right: 2px solid rgba(255, 255, 255, 0.9);
  transform: rotate(45deg);
  flex: 0 0 auto;
}

.breadcrumb-home img {
  width: 46px;
  height: 46px;
  display: block;
  object-fit: contain;
  flex: 0 0 auto;
}

/* Content area and card grid */
.content-area {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.content-area.is-transitioning {
  pointer-events: none;
  cursor: progress;
}

body.nav-switch-in-progress,
body.nav-switch-in-progress * {
  cursor: progress !important;
}
.card-grid {
  display: grid;
  /* Desktop: three columns */
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  /* Leave room so active glow is not clipped at grid edges */
  padding: 6px;
  margin: -6px;
  overflow: visible;
}

/* Card load-in animation adopted from option-4 prototype */
.card-grid.card-load-enter {
  perspective: 1200px;
}

.card-grid.card-load-enter .card {
  opacity: 0;
  filter: blur(1.5px) brightness(0.86);
  transform: translateY(10px) scale(0.985);
  transform-origin: center center;
  will-change: transform, opacity, filter;
}

.card-grid.card-load-enter.is-loaded .card {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0) brightness(1);
  transition:
    transform 0.56s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    filter 0.48s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: var(--card-load-delay, 0s);
}

/* Card exit animation mirrors cascade-shrink-blur-auto timing/easing */
.card-grid.card-load-enter.is-loaded.card-exit .card {
  transform: translateY(36px) scale(0.9);
  opacity: 0;
  filter: blur(3px);
  transition:
    transform 0.22s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.18s ease,
    filter 0.2s ease;
  transition-delay: var(--card-load-delay, 0s);
}

/* Fallback stagger for grids that don't provide --card-load-delay inline */
.card-grid.card-exit .card:nth-child(1) { --card-load-delay: 0s; }
.card-grid.card-exit .card:nth-child(2) { --card-load-delay: 0.012s; }
.card-grid.card-exit .card:nth-child(3) { --card-load-delay: 0.024s; }
.card-grid.card-exit .card:nth-child(4) { --card-load-delay: 0.036s; }
.card-grid.card-exit .card:nth-child(5) { --card-load-delay: 0.048s; }
.card-grid.card-exit .card:nth-child(6) { --card-load-delay: 0.06s; }
.card-grid.card-exit .card:nth-child(7) { --card-load-delay: 0.072s; }
.card-grid.card-exit .card:nth-child(8) { --card-load-delay: 0.084s; }
.card-grid.card-exit .card:nth-child(9) { --card-load-delay: 0.096s; }

/* Bathroom + Kitchen root row: 2 columns on desktop/tablet, 1 on mobile */
.room-root-grid {
  grid-template-columns: repeat(2, 1fr);
}

/* Individual card styling */
.card {
  background: rgba(255, 255, 255, 0.9);
  border: 2px solid transparent;
  background-clip: padding-box;
  border-radius: 10px;
  /* Maintain a 4:3 aspect ratio to better fit the current card imagery */
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  text-align: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  user-select: none;
}

.card-text {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.5);
  padding: 14px 12px;
  position: relative;
  z-index: 5;
}

.card-name,
.card-price {
  color: #fff;
  line-height: 1.2;
}

.card-name {
  font-size: 24px;
  font-weight: 700;
}

.card-price {
  font-size: 24px;
  font-weight: 500;
}
.card:hover {
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}
.card.active-choice {
  border-color: rgba(244, 222, 187, 0.96);
  box-shadow:
    0 14px 26px -22px rgba(255, 189, 97, 0.2),
    0 26px 46px -36px rgba(255, 189, 97, 0.14);
  animation: active-card-bottom-glow 7.8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.card.active-choice:hover {
  border-color: rgba(244, 222, 187, 0.96);
  box-shadow:
    0 14px 26px -22px rgba(255, 189, 97, 0.2),
    0 26px 46px -36px rgba(255, 189, 97, 0.14);
}


@keyframes active-card-bottom-glow {
  0%,
  100% {
    box-shadow:
      0 12px 24px -22px rgba(255, 189, 97, 0.16),
      0 24px 42px -34px rgba(255, 189, 97, 0.1);
  }
  50% {
    box-shadow:
      0 18px 30px -20px rgba(255, 189, 97, 0.24),
      0 34px 54px -32px rgba(255, 189, 97, 0.16);
  }
}

/*
 * Image cards (room cards and section cards that include `image`)
 * render a dedicated background photo with a subtle dark overlay
 * for legible text.
 */
.card.card-with-image {
  background-color: #111;
  overflow: hidden;
  isolation: isolate;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.card.card-with-image::after {
  content: '';
  position: absolute;
  inset: -10%;
  border-radius: inherit;
  background-image: var(--card-bg-image);
  background-size: cover;
  background-position: 50% 50%;
  background-repeat: no-repeat;
  transition: filter 0.45s ease;
  will-change: filter;
  z-index: 0;
}

.card.card-with-image::before {
  content: none;
}

.card.card-with-image .card-text {
  /*
   * Keep image-card labels above the completed-state fill overlay so
   * the overlay darkens the photo while label text stays bright white.
   */
  background: rgba(0, 0, 0, 0.68);
  z-index: 5;
}

.card.card-with-image .card-name,
.card.card-with-image .card-price {
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.card.card-has-complete-fill .card-text {
  background: transparent;
}

.card.card-with-image:hover::after {
  filter: brightness(1.06) contrast(1.03);
}

.card.room-card-bathroom .card-name,
.card.room-card-kitchen .card-name {
  font-size: 32px;
}

/* Imported completion treatment based on fill-check.html */
.card-complete-fill {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 74px;
  background: rgba(0, 0, 0, 0.55);
  z-index: 3;
  pointer-events: none;
}

.card-complete-fill:not(.is-animated) {
  height: 100%;
}

.card-complete-fill.is-animated {
  animation: fillOvershoot 1.95s cubic-bezier(.16, 1, .3, 1) forwards;
}

@keyframes fillOvershoot {
  0% { height: 74px; }
  78% { height: 106%; }
  100% { height: 100%; }
}

.card-complete-check,
.config-selected-check {
  position: absolute;
  line-height: 1;
  color: #6cff8f;
  opacity: 1;
  z-index: 6;
  pointer-events: none;
}

.card-complete-check {
  left: 50%;
  top: 50%;
  font-size: 80px;
  transform: translate(-50%, -50%);
}

.card-complete-check.is-animated {
  opacity: 0;
  transform: translate(-50%, -72%);
  animation: cardCompleteDropClean 0.26s ease-out forwards;
  animation-delay: 1.08s;
}

.config-selected-check {
  left: 50%;
  top: 50%;
  font-size: 80px;
  transform: translate(-50%, -50%);
}

.card .icon-overlay {
  position: absolute;
  top: 10px;
  right: 12px;
  font-size: 40px;
  line-height: 1;
  z-index: 7;
  opacity: 1;
}

.card .icon-overlay.close {
  color: #ff6b5f;
  cursor: pointer;
}

.card .icon-overlay.close.is-animated {
  opacity: 0;
  animation: closeFadeIn 0.26s ease-out forwards;
}

.card .icon-overlay.close.is-exiting {
  pointer-events: none;
  animation: closeFadeOut 0.22s ease-out forwards;
}

.config-selected-check.is-animated {
  opacity: 0;
  transform: translate(-50%, -88%);
  animation: dropClean 0.26s ease-out forwards;
}

.config-selected-check.is-exiting {
  animation: selectedCheckFadeOut 0.22s ease-out forwards;
}

@keyframes dropClean {
  0% {
    opacity: 0;
    transform: translate(-50%, -88%);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

@keyframes cardCompleteDropClean {
  0% {
    opacity: 0;
    transform: translate(-50%, -88%);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

@keyframes selectedCheckFadeOut {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -40%);
  }
}

@keyframes closeFadeIn {
  0% {
    opacity: 0;
    transform: scale(0.92);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes closeFadeOut {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(0.92);
  }
}

/*
 * Locked cards (completed steps)
 *
 * Completed steps appear faded but remain interactive. All cards
 * retain pointer events so users can revisit and change their
 * selection. The selected card stays fully opaque and shows a
 * lightweight selected check instead of a destructive remove affordance.
 * Hovering over an unselected locked card restores full opacity and
 * border highlight to signal interactivity.
 */
.locked-card {
  opacity: 0.5;
  /* Keep pointer events enabled so users can click to change */
  pointer-events: auto;
  transition: opacity 0.2s ease;
}
.locked-card.completed {
  opacity: 1;
}

.card.completed .card-name,
.card.completed .card-price {
  color: rgba(255, 255, 255, 0.68);
}

.locked-card:hover {
  opacity: 1;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}
.locked-card.completed:hover {
  border-color: transparent;
}
@media (prefers-reduced-motion: reduce) {
  /*
   * Preserve a brief completion affordance without spatial movement.
   * The reduced-motion treatment fades states in/out instead of using
   * drop, overshoot, or travel-based motion.
   */
  .card-complete-fill.is-animated {
    height: 100%;
    opacity: 0.72;
    animation: reducedCompletionFade 140ms ease-out forwards;
  }

  .card-complete-check.is-animated,
  .config-selected-check.is-animated,
  .card .icon-overlay.close.is-animated {
    animation: reducedAffordanceFadeIn 140ms ease-out forwards;
  }

  .card-complete-check.is-animated,
  .config-selected-check.is-animated,
  .config-selected-check.is-exiting {
    transform: translate(-50%, -50%);
  }

  .config-selected-check.is-exiting,
  .card .icon-overlay.close.is-exiting {
    animation: reducedAffordanceFadeOut 100ms ease-out forwards;
  }
}

@keyframes reducedCompletionFade {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 0.72;
  }
}

@keyframes reducedAffordanceFadeIn {
  0% {
    opacity: 0;
    filter: brightness(1);
  }
  100% {
    opacity: 1;
    filter: brightness(1.08);
  }
}

@keyframes reducedAffordanceFadeOut {
  0% {
    opacity: 1;
    filter: brightness(1.08);
  }
  100% {
    opacity: 0;
    filter: brightness(1);
  }
}

/*
 * Dark overlay that appears behind the cart drawer when it is open.
 * It covers the entire viewport, darkening the background and
 * intercepting clicks. It is hidden by default and shown when
 * the drawer is open via the 'show' class applied by JS.
 */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: transparent;
  opacity: 0;
  visibility: hidden;
  z-index: 90;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  /* Default state: prevent overlay from capturing clicks when hidden */
  pointer-events: none;
}
.overlay.show {
  opacity: 1;
  visibility: visible;
  /* When showing overlay, allow it to capture clicks to block background interactions */
  pointer-events: auto;
}

/* Price area and button */
.price-area {
  margin-top: 20px;
  display: none;
  text-align: center;
}
.price-area .price-range-wrap {
  color: #ffffff;
  font-size: 22.5px;
  margin-bottom: 10px;
}

.price-area .price-range-label {
  margin-right: 6px;
}

.price-area .price-range.price-range-flash {
  animation: running-total-flash 260ms ease-out;
}
.price-area button {
  background: #2ecc71;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  transition: background 0.2s ease;
}
.price-area button:hover {
  background: #27ae60;
}

/* Cart drawer styling */
.cart-drawer {
  position: fixed;
  top: 0;
  right: calc(-1 * min(451px, 100vw));
  width: min(451px, 100vw);
  max-width: 451px;
  height: var(--cart-drawer-height, 100vh);
  max-height: 100vh;
  box-sizing: border-box;
  background: linear-gradient(180deg, rgba(14, 14, 14, 0.94) 0%, rgba(4, 4, 4, 0.94) 100%);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: -12px 0 32px rgba(0, 0, 0, 0.45);
  -webkit-backdrop-filter: blur(10px) saturate(120%);
  backdrop-filter: blur(10px) saturate(120%);
  transition: right 0.3s ease, height 0.32s cubic-bezier(0.22, 1, 0.36, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 100;
}
.cart-drawer.open {
  right: 0;
}
.cart-drawer > * {
  opacity: 0;
  transition: opacity 0.12s ease;
}
.cart-drawer.open > * {
  opacity: 1;
}
.cart-drawer.is-closing > * {
  opacity: 0;
}
.cart-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: flex-start;
  gap: 16px;
  padding: 16px;
  border-bottom: none;
}
.cart-share-status {
  display: flex;
  align-items: center;
  min-height: 18px;
  grid-column: 1 / -1;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.72);
}
.cart-share-status:empty {
  display: none;
}
.cart-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.cart-header-actions-left {
  position: relative;
  justify-self: start;
}
.cart-tab-active-indicator {
  position: absolute;
  top: 0;
  left: 0;
  width: var(--cart-tab-indicator-width, 0px);
  height: var(--cart-tab-indicator-height, 0px);
  transform: translate3d(var(--cart-tab-indicator-x, 0px), var(--cart-tab-indicator-y, 0px), 0);
  border: 2px solid rgba(244, 222, 187, 0.96);
  pointer-events: none;
  opacity: 0;
  transition:
    transform 0.28s cubic-bezier(0.33, 1, 0.68, 1),
    width 0.28s cubic-bezier(0.33, 1, 0.68, 1),
    height 0.28s cubic-bezier(0.33, 1, 0.68, 1),
    opacity 0.18s ease;
}
.cart-header-actions-left.has-active-indicator .cart-tab-active-indicator {
  opacity: 1;
}
.cart-header-actions-left.cart-tab-indicator-instant .cart-tab-active-indicator {
  transition: none;
}
.cart-header-actions-right {
  grid-column: 3;
  justify-self: end;
}
.cart-share-button,
.cart-header .close-cart {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  color: #ffffff;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.cart-share-button {
  flex-direction: column-reverse;
  gap: 6px;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-align: center;
  border: 2px solid transparent;
  background: transparent;
  box-shadow: none;
}
#estimate-cart.cart-share-button,
#share-cart.cart-share-button,
#download-cart-csv.cart-share-button {
  border-radius: 0;
}
.cart-share-button.is-active {
  border-color: transparent;
  background: transparent;
  box-shadow:
    0 12px 24px -22px rgba(255, 189, 97, 0.16),
    0 24px 42px -34px rgba(255, 189, 97, 0.1);
}
.cart-share-button.is-active .cart-share-button-icon {
  color: rgba(255, 255, 255, 0.9);
}
.cart-share-button:not(.is-active) .cart-share-button-icon {
  color: rgba(244, 222, 187, 0.96);
}
.cart-share-button-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  color: rgba(255, 255, 255, 0.9);
}
.cart-share-button-icon svg {
  width: 100%;
  height: 100%;
}
#estimate-cart .cart-share-button-icon svg,
#share-cart .cart-share-button-icon svg,
#download-cart-csv .cart-share-button-icon svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.cart-share-button-label {
  display: inline-flex;
  align-items: center;
}
.cart-share-button:hover,
.cart-header .close-cart:hover {
  background: rgba(255, 255, 255, 0.16);
}
.cart-header .close-cart:hover {
  transform: none;
}
.cart-share-button:not(.is-active):hover {
  background: rgba(255, 255, 255, 0.08);
}
.cart-share-button:not(.is-active):hover .cart-share-button-icon {
  color: rgba(255, 255, 255, 0.95);
}
.cart-share-button.is-active:hover {
  background: transparent;
  border-color: transparent;
  box-shadow:
    0 12px 24px -22px rgba(255, 189, 97, 0.16),
    0 24px 42px -34px rgba(255, 189, 97, 0.1);
}
@media (prefers-reduced-motion: reduce) {
  .cart-tab-active-indicator {
    transition: none;
  }
}
.cart-share-button:focus-visible,
.cart-header .close-cart:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.9);
  outline-offset: 2px;
}
.cart-header .close-cart {
  width: 36px;
  padding: 0;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  background: transparent;
  font-size: 49px;
  line-height: 1;
}
.cart-header .close-cart:hover {
  color: rgba(244, 222, 187, 1);
  background: transparent;
  border-color: transparent;
}
.cart-items {
  flex: 0 1 auto;
  min-height: 0;
  max-height: var(--cart-items-max-height, calc(100vh - 220px));
  overflow-y: hidden;
  padding: 16px;
}
.cart-items.is-scrollable {
  overflow-y: auto;
}
.cart-tab-panel-enter {
  animation: cart-tab-enter 340ms cubic-bezier(0.22, 1, 0.36, 1);
}
.cart-tab-panel-enter-delayed {
  animation-delay: 140ms;
  animation-fill-mode: both;
}
.cart-tab-panel-exit {
  animation: cart-tab-exit 260ms cubic-bezier(0.4, 0, 0.2, 1) both;
}
@keyframes cart-tab-enter {
  from {
    opacity: 0;
    transform: translateY(-18px);
    filter: blur(1.5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}
@keyframes cart-tab-exit {
  from {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
  to {
    opacity: 0;
    transform: translateY(18px);
    filter: blur(1.5px);
  }
}

.themed-scrollbar {
  scrollbar-width: thin;
  scrollbar-color: rgba(190, 194, 201, 0.92) rgba(255, 255, 255, 0.08);
}

.themed-scrollbar::-webkit-scrollbar {
  width: 12px;
}

.themed-scrollbar::-webkit-scrollbar-track {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 100%);
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.themed-scrollbar::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(214, 219, 226, 0.96) 0%, rgba(154, 160, 168, 0.96) 100%);
  border-radius: 999px;
  border: 2px solid rgba(12, 12, 12, 0.9);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2), 0 0 10px rgba(0, 0, 0, 0.22);
}

.themed-scrollbar::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(229, 233, 238, 1) 0%, rgba(176, 182, 190, 1) 100%);
}

.themed-scrollbar::-webkit-scrollbar-corner {
  background: transparent;
}
.cart-item {
  position: relative;
  margin-bottom: 16px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.16);
}
.cart-item.is-exiting {
  pointer-events: none;
  animation: cart-item-exit 220ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
@keyframes cart-item-exit {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
  }
}
.cart-item-title-row {
  display: block;
  margin-bottom: 8px;
  padding-right: 108px;
}
.cart-item-title {
  font-weight: bold;
  min-width: 0;
}
.cart-item-actions {
  position: absolute;
  top: 14px;
  right: 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.cart-item-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: auto;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.9);
  opacity: 0.5;
  cursor: pointer;
  transition: color 0.2s ease, transform 0.2s ease;
}
.cart-item-action-button:hover {
  opacity: 1;
  color: rgba(244, 222, 187, 0.96);
}
.cart-item-action-button:focus-visible {
  opacity: 1;
  outline: 2px solid rgba(255, 255, 255, 0.85);
  outline-offset: 2px;
}
.cart-item-action-button svg {
  width: 22.5px;
  height: 22.5px;
  fill: currentColor;
}
.cart-item-action-button:disabled {
  opacity: 0.65;
  cursor: default;
  transform: none;
}
.cart-item-options {
  margin: 0;
  padding-left: 18px;
  font-size: 14px;
  color: #ffffff;
  list-style-type: disc;
}
.cart-item-price {
  margin-top: 15px;
  font-weight: bold;
}
@media (min-width: 901px) {
  .cart-item-actions {
    top: 50%;
    transform: translateY(-50%);
    flex-direction: column;
    justify-content: center;
    gap: 2px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .cart-item.is-exiting {
    animation: none;
  }
}
.cart-info-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cart-info-copy {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.86);
}
.cart-info-link {
  color: rgba(244, 222, 187, 0.98);
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 600;
}
.cart-info-link:hover {
  color: #ffffff;
}
.cart-info-status {
  margin: 0;
  min-height: 18px;
  font-size: 13px;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.72);
}
.cart-footer {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px;
}

.cart-total {
  display: flex;
  flex: 0 1 auto;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  min-width: 220px;
  padding: 6px 14px 8px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-align: center;
  margin: 10px auto 4px;
  width: fit-content;
}

.cart-total-label {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
}

.cart-total-value {
  display: inline-flex;
  align-items: center;
  min-width: 14ch;
  justify-content: center;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
}

@media (max-width: 900px) {
  .cart-header {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: flex-start;
    gap: 12px;
  }

  .cart-header-actions {
    flex-direction: row;
    align-items: center;
  }

  .cart-header-actions-left {
    grid-column: 1;
    justify-self: start;
    min-width: 0;
    flex-wrap: wrap;
    row-gap: 8px;
  }

  .cart-header-actions-right {
    grid-column: 2;
    justify-self: end;
  }

  .cart-share-button,
  .cart-header .close-cart {
    width: auto;
  }
}

/* Completed question headings are muted */
/* Active question headings should stay readable on dark backgrounds */
.question-label {
  color: #ffffff;
  margin-bottom: 10px;
}

/* Completed question headings appear muted for clarity */
.question-label.completed {
  color: #ffffff;
}

/* Responsive tweaks */
@media (max-width: 900px) {
  .app-container {
    margin-top: 0;
    max-width: 90%;
  }
  .breadcrumbs > span:not(.breadcrumb-home),
  .breadcrumb-new,
  .breadcrumb-old {
    display: none !important;
  }
  .breadcrumbs > span::after,
  .breadcrumb-new-inner > span::after,
  .breadcrumb-old::before,
  .breadcrumb-old-inner > span::after {
    display: none !important;
    content: none;
  }
  /* Tablet: two cards per row */
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .room-root-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 600px) {
  /* Mobile: one card per row */
  .card-grid {
    grid-template-columns: 1fr;
  }
  .room-root-grid {
    grid-template-columns: 1fr;
  }
}
