:root {
  --drawer-collapsed-height: 56px;
}

/* -----------------------------
   /quote onramp (index.html)
   Keep minimal; rely on site.css when possible.
------------------------------ */
.quote-onramp {
  max-width: 1100px;
  margin: 0 auto;
}

.quote-onramp .intro {
  max-width: 820px;
  margin: 0 auto 26px;
  text-align: center;
}

.quote-onramp .intro h1 {
  margin-bottom: 10px;
}

.quote-onramp .intro .paragraph {
  margin: 10px 0;
}

.quote-onramp .onramp-sections {
  margin-top: 28px;
  display: grid;
  gap: 24px;
}

.quote-onramp .group h2 {
  margin: 0 0 12px;
}

.quote-onramp .grid {
  position: relative;
  display: grid;
  gap: 16px;
  /* Up to 3 across (min width keeps cards readable inside max-width 1100px container) */
  grid-template-columns: repeat(auto-fit, minmax(356px, 1fr));
}

.quote-onramp .robot-card {
  position: relative;
  padding: 16px;
  cursor: pointer;
  /* Allow read-more panel to span the full grid row (site.css uses overflow:hidden on .product-card) */
  overflow: visible;
}

.quote-onramp .robot-card.robot-card--details-open {
  z-index: 10;
}

.quote-onramp .robot-card.robot-card--details-open .robot-card-header {
  position: relative;
  z-index: 2;
}

/* Avoid double border / lift when the spanning outline is showing (matches .product-card:hover) */
.quote-onramp .robot-card.robot-card--details-open:hover {
  transform: none;
  border-color: transparent !important;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* JS-drawn path: active column “cap” + full-width panel (see quote-onramp.js) */
.quote-onramp .robot-onramp-row-outline {
  position: absolute;
  inset: 0;
  width: auto;
  height: auto;
  overflow: visible;
  pointer-events: none;
  z-index: 12;
}

.quote-onramp .robot-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}

.quote-onramp .robot-card-text {
  min-width: 0;
}

.quote-onramp .robot-card-title {
  font-weight: bold;
  margin: 0;
}

.quote-onramp .robot-card-subtitle {
  margin: 6px 0 0;
  opacity: 0.9;
}

.quote-onramp .robot-card-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
  flex: 0 0 auto;
}

.quote-onramp .robot-read-more .chevron-icon {
  transition: transform 0.2s ease;
}

.quote-onramp .robot-read-more[aria-expanded='true'] .chevron-icon {
  transform: rotate(180deg);
}

.quote-onramp .robot-thumb {
  width: 120px;
  height: 120px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 6px;
}

.quote-onramp .robot-details {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
  margin-top: 10px;
}

.quote-onramp .robot-details.is-open {
  max-height: none;
  overflow: visible;
  position: absolute;
  z-index: 3;
  box-sizing: border-box;
  margin-top: 10px;
  display: flow-root;
  /* left, width, top set in quote-onramp.js to match .grid row width */
  /* Opaque: do not use inherit — parent .product-card:hover uses semi-transparent blue */
  background-color: var(--card-bg, #1a1a1e);
  background-image: none;
  /* Match .product-card border-radius (site.css) */
  border-radius: 0 0 8px 8px;
  padding-bottom: 16px;
  /* Diffuse only — a tight shadow can read as a second bottom edge next to the SVG stroke */
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.22);
}

.quote-onramp .robot-card:hover .robot-details.is-open {
  background-color: var(--card-bg, #1a1a1e) !important;
}

/* Match grid/card horizontal inset when the panel spans the full row */
.quote-onramp .robot-details.is-open.robot-details--row-span {
  padding-left: 16px;
  padding-right: 16px;
}

.quote-onramp .status {
  opacity: 0.92;
  white-space: nowrap;
}

.option-qty-controls {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: 8px;
}

.option-qty-controls .option-qty-input {
  width: 52px;
  padding: 4px 6px;
  text-align: center;
}

.option-qty-controls .option-qty-dec,
.option-qty-controls .option-qty-inc {
  width: 28px;
  height: 28px;
  padding: 0;
  line-height: 1;
  cursor: pointer;
}

.admin-matrix-qty {
  min-width: 56px;
  padding: 4px 6px;
}

/* -----------------------------
   Quote builder page layout
------------------------------ */
.quote-builder-main {
  padding: 120px 20px 260px;
}

.quote-auth-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(var(--drawer-collapsed-height) + var(--price-drop-bar-height, 0px));
  background: #0b0b0b;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 12px 20px;
  z-index: 1002;
  display: none;
}

/* -----------------------------
   Price-drop notify bar (quote.html)
------------------------------ */
.price-drop-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: var(--drawer-collapsed-height);
  width: auto;
  max-width: none;
  z-index: 1001;
  padding: 10px 14px;
  background: linear-gradient(180deg, rgba(0, 51, 153, 0.96) 0%, rgba(0, 40, 120, 0.94) 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  border-bottom: 0;
  border-radius: 0;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.24);
}

.price-drop-bar:not(.is-collapsed) {
  padding: 12px 14px;
}

.price-drop-bar[hidden] {
  display: none !important;
}

.price-drop-bar__inner {
  display: flex;
  gap: 8px;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.price-drop-bar:not(.is-collapsed) .price-drop-bar__inner {
  gap: 10px;
}

.price-drop-bar.is-collapsed .price-drop-bar__panel {
  display: none;
}

.price-drop-bar.is-collapsed .price-drop-bar__collapsed-cta {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
}

.price-drop-bar.is-collapsed .price-drop-bar__collapsed-cta .price-drop-bar__title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.price-drop-bar:not(.is-collapsed) .price-drop-bar__collapsed-cta {
  display: none;
}

.price-drop-bar.is-collapsed .price-drop-bar__status {
  display: none;
}

.price-drop-bar.is-collapsed .price-drop-bar__hint {
  display: none;
}

.price-drop-bar__collapsed-cta {
  display: none;
  flex: 1 1 auto;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
  text-align: left;
  cursor: pointer;
}

.price-drop-bar__hint {
  font-size: 12px;
  opacity: 0.82;
  white-space: nowrap;
}

.price-drop-bar__panel {
  display: flex;
  gap: 12px;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
}

.price-drop-bar__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1 1 220px;
}

.price-drop-bar__title {
  font-weight: 700;
  font-size: 15px;
  line-height: 1.2;
  color: #fff;
}

.price-drop-bar__subtitle {
  font-size: 12px;
  line-height: 1.3;
  opacity: 0.9;
  color: #fff;
}

.price-drop-bar__form {
  display: flex;
  gap: 8px;
  align-items: center;
  flex: 1 1 320px;
  min-width: 0;
}

.price-drop-bar__email {
  flex: 1 1 180px;
  min-width: 0;
  padding: 9px 10px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(0, 0, 0, 0.22);
  color: #fff;
}

.price-drop-bar__email::placeholder {
  color: rgba(255, 255, 255, 0.72);
}

.price-drop-bar__submit {
  flex: 0 0 auto;
  white-space: nowrap;
  padding: 9px 14px;
  min-height: 38px;
}

.price-drop-bar__dismiss {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.9);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.price-drop-bar__dismiss:hover {
  background: rgba(255, 255, 255, 0.16);
}

.price-drop-bar__status {
  max-width: 1200px;
  margin: 6px auto 0;
  min-height: 0;
  font-size: 12px;
  color: #fff;
  opacity: 0;
  transition: opacity 180ms ease;
}

.price-drop-bar:not(.is-collapsed) .price-drop-bar__inner {
  flex-wrap: wrap;
  align-items: flex-start;
}

.price-drop-bar:not(.is-collapsed) .price-drop-bar__panel {
  flex-wrap: wrap;
  width: 100%;
}

.price-drop-bar:not(.is-collapsed) .price-drop-bar__text {
  flex: 1 1 calc(100% - 44px);
  padding-right: 4px;
}

.price-drop-bar:not(.is-collapsed) .price-drop-bar__form {
  flex: 1 1 100%;
  width: 100%;
}

.price-drop-bar:not(.is-collapsed) .price-drop-bar__dismiss {
  margin-left: auto;
}

.price-drop-bar__status.is-visible {
  opacity: 0.95;
  min-height: 16px;
}

body.has-price-drop-bar-mobile .quote-builder-main {
  padding-bottom: calc(260px + var(--price-drop-bar-height, 0px));
}

.quote-auth-bar__form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.quote-auth-bar__cancel {
  display: none;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.45);
  color: #fff;
}

.quote-auth-bar__cancel:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.6);
}

.drawer-guest-actions {
  display: none;
  flex: 1 1 auto;
  gap: 10px;
  align-items: center;
}

.drawer-guest-actions .cta-button {
  flex: 1 1 0;
  min-width: 0;
  min-height: 38px;
}

/* Push total/summary to the drawer right when admin actions are hidden (guest desktop). */
#drawer-summary {
  margin-left: auto;
}

@media (min-width: 900px) {
  .price-drop-bar {
    top: 120px;
    padding: 12px 16px;
  }
}

@media (min-width: 681px) {
  .quote-auth-bar__cancel {
    display: none !important;
  }

  .price-drop-bar {
    top: 108px;
    right: 14px;
    left: auto;
    bottom: auto;
    max-width: min(360px, calc(100vw - 28px));
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
    z-index: 1500;
    padding: 12px 14px;
  }

  .price-drop-bar.is-collapsed .price-drop-bar__panel {
    display: flex;
  }

  .price-drop-bar.is-collapsed .price-drop-bar__collapsed-cta {
    display: none;
  }

  .price-drop-bar.is-collapsed .price-drop-bar__status {
    display: block;
  }

  .price-drop-bar__inner {
    position: relative;
    flex-direction: column;
    align-items: stretch;
    max-width: none;
    margin: 0;
  }

  .price-drop-bar__panel {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  .price-drop-bar:not(.is-collapsed) .price-drop-bar__text,
  .price-drop-bar.is-collapsed .price-drop-bar__text {
    flex: 1 1 auto;
    padding-right: 36px;
  }

  .price-drop-bar:not(.is-collapsed) .price-drop-bar__form,
  .price-drop-bar.is-collapsed .price-drop-bar__form {
    flex: 0 0 auto;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  .price-drop-bar__email {
    flex: 0 0 auto;
    width: 100%;
    height: 38px;
    min-height: 38px;
    max-height: 38px;
    box-sizing: border-box;
  }

  .price-drop-bar__submit {
    width: 100%;
  }

  .price-drop-bar:not(.is-collapsed) .price-drop-bar__dismiss,
  .price-drop-bar.is-collapsed .price-drop-bar__dismiss {
    position: absolute;
    top: 8px;
    right: 8px;
    margin-left: 0;
  }

  .price-drop-bar__status {
    max-width: none;
    margin: 8px 0 0;
  }
}

@media (max-width: 680px) {
  .quote-builder-main {
    padding: 96px 14px 200px;
  }

  body.has-price-drop-bar-mobile .quote-builder-main {
    padding-bottom: calc(200px + var(--price-drop-bar-height, 0px));
  }

  body.has-auth-panel-open .quote-builder-main {
    padding-bottom: calc(200px + var(--auth-panel-height, 0px) + var(--price-drop-bar-height, 0px));
  }

  .price-drop-bar {
    padding: 8px 12px;
  }

  .price-drop-bar:not(.is-collapsed) .price-drop-bar__subtitle {
    display: none;
  }

  .quote-page-help-capture {
    margin-top: 0;
  }

  .quote-auth-bar {
    padding: 10px 14px;
    display: none !important;
  }

  .quote-auth-bar.is-open {
    display: block !important;
  }

  .quote-auth-bar__cancel {
    display: inline-flex;
  }

  .quote-auth-bar strong {
    flex: 1 1 100%;
    font-size: 14px;
  }

  .drawer-guest-actions.is-visible {
    display: flex;
  }

  #quote-drawer-toggle {
    cursor: default;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 10px !important;
  }

  .drawer-guest-actions.is-visible {
    flex: 1 1 180px;
    min-width: 0;
    order: 1;
  }

  #drawer-summary {
    cursor: pointer;
    flex: 0 0 auto;
    order: 2;
    margin-left: auto;
  }
}

.help-capture {
  margin: 14px 0 18px;
}

.help-capture-inner {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.help-capture-text {
  min-width: 220px;
  flex: 1 1 280px;
}

.help-capture-title {
  font-weight: 700;
  font-size: 16px;
}

.help-capture-subtitle {
  margin: 6px 0 0;
  opacity: 0.9;
}

.help-capture-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  flex: 1 1 320px;
}

.help-capture-email {
  flex: 1 1 220px;
  min-width: 220px;
  padding: 10px;
}

.help-capture-status {
  margin-top: 10px;
  min-height: 18px;
}

@media (max-width: 900px) {
  .quote-onramp .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .quote-onramp .robot-thumb {
    width: 96px;
    height: 96px;
  }
}

@media (max-width: 680px) {
  .quote-onramp .grid {
    grid-template-columns: 1fr;
  }
}

/* -----------------------------
   Quote builder (quote.html)
------------------------------ */
.quote-section {
  margin-top: 22px;
}

.quote-section h2 {
  margin-bottom: 12px;
}

.option-grid {
  display: grid;
  gap: 16px;
}

.option-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.option-card-text {
  min-width: 0;
}

.option-card-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.option-card-actions .option-read-more {
  margin: 0;
  white-space: nowrap;
}

.option-card-actions .option-status {
  white-space: nowrap;
  opacity: 0.92;
}

.icon-delete-x {
  width: 20px;
  height: 20px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: #ff4d4d;
  font-weight: 700;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.icon-delete-x:hover {
  color: #ff2e2e;
}

.icon-delete-x:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.72);
  z-index: 9000;
}

.modal-overlay.is-open {
  display: flex;
}

.modal-card {
  width: 100%;
  max-width: 520px;
  background: var(--bg-color, #0b0b0b);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
}

[data-theme="light"] .modal-card {
  border-color: var(--border-color, #ddd);
}

.modal-card--status {
  max-width: 440px;
  padding: 28px 24px;
  text-align: center;
}

.modal-title {
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--heading-color, #fff);
}

.modal-subtitle {
  margin: 8px 0 0;
  line-height: 1.5;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.drawer-layout {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.drawer-main {
  flex: 1 1 auto;
  min-width: 0;
}

.drawer-sidebar {
  flex: 0 0 320px;
  max-width: 420px;
}

#save-status {
  opacity: 0;
  transition: opacity 180ms ease;
}

#save-status.is-visible {
  opacity: 0.92;
}

#quote-drawer {
  max-height: 50vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#quote-drawer-toggle {
  flex: 0 0 auto;
}

#quote-drawer-content {
  flex: 1 1 auto;
  min-height: 0; /* required for overflow scrolling inside a flex container */
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.party-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.party-card {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.02);
}

.party-fields {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.party-fields input {
  width: 100%;
  padding: 8px;
}

.history-list {
  list-style: none;
  padding-left: 0;
  margin: 10px 0 0;
}

.history-list li {
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.history-list li:last-child {
  border-bottom: none;
}

@media (max-width: 900px) {
  .drawer-layout {
    flex-direction: column;
  }
  .drawer-sidebar {
    flex: 1 1 auto;
    width: 100%;
    max-width: none;
  }
  .party-columns {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .option-card {
    padding: 14px !important;
  }

  .option-card-header {
    flex-wrap: wrap;
  }

  .option-card-actions {
    width: 100%;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
  }

  .option-card-actions .option-read-more {
    flex-direction: row;
    gap: 6px;
    white-space: normal;
  }

  .option-card-actions .option-read-more .chevron-icon {
    width: 18px;
    height: 18px;
  }

  .option-card-actions .option-status {
    white-space: normal;
    text-align: right;
  }
}

@media (max-width: 900px) {
  #quote-drawer-toggle {
    padding: 10px 14px !important;
  }

  #drawer-actions.is-visible {
    display: flex !important;
  }

  #drawer-actions {
    flex-wrap: nowrap !important;
    align-items: center;
    gap: 8px !important;
    width: 100%;
    overflow: hidden;
  }

  #drawer-actions .cta-button {
    flex: 1 1 0;
    min-width: 0;
    padding: 6px 6px;
    font-size: clamp(10px, 2.6vw, 12px);
    line-height: 1.05;
    min-height: 30px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  #quote-drawer-toggle {
    display: flex !important;
    flex-direction: column;
    align-items: stretch !important;
    gap: 6px !important;
  }

  #drawer-summary {
    display: flex !important;
    flex-direction: row !important;
    align-items: baseline !important;
    justify-content: flex-end;
    gap: 10px !important;
    min-width: 0;
  }

  #drawer-summary > div {
    margin: 0;
  }

  #drawer-lead-time,
  #save-status {
    display: none !important;
  }

  #drawer-toggle-label {
    min-width: 0 !important;
    font-size: 12px;
    opacity: 0.9;
    white-space: nowrap;
    text-align: right;
  }
}

/* Discount progress */
.discount-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.discount-step {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  padding: 8px 10px;
  text-align: center;
  font-size: 13px;
  opacity: 0.55;
  background: rgba(255, 255, 255, 0.02);
}

.discount-step.is-done {
  opacity: 0.85;
  border-color: rgba(0, 102, 255, 0.55);
  background: rgba(0, 102, 255, 0.12);
}

.discount-step.is-current {
  opacity: 1;
  border-color: #06f;
  background: rgba(0, 102, 255, 0.18);
}

.discount-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}

.discount-form-grid input {
  width: 100%;
  padding: 8px;
}

.discount-form-grid .full {
  grid-column: 1 / -1;
}

@media (max-width: 900px) {
  .discount-form-grid {
    grid-template-columns: 1fr;
  }
}
