: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 4 across, but if fewer cards exist they expand full width */
  grid-template-columns: repeat(auto-fit, minmax(260px, 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;
}

.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.65);
  z-index: 2000;
}

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

.modal-card {
  width: 100%;
  max-width: 520px;
  background: #0b0b0b;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.55);
}

.modal-title {
  font-weight: 700;
  font-size: 18px;
}

.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 {
    display: flex !important;
    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;
  }
}
