/* =========================================================
   Item details dropdown — MUST load AFTER ui-polish.css
   White background + grey text only. No blue bubbles.
   ========================================================= */

.quote-items {
  overflow: visible !important;
}

.quote-item-row {
  position: relative;
}

.cn-item-details-wrap,
.item-details-wrap {
  position: relative;
  min-width: 0;
  z-index: 1;
  display: block;
}

.cn-item-details-wrap:focus-within,
.item-details-wrap:focus-within,
.quote-item-row:focus-within {
  z-index: 50;
}

.cn-item-details-wrap > input,
.item-details-wrap > input {
  width: 100%;
  box-sizing: border-box;
}

/* White list panel */
body .item-search-results,
body .cn-item-search-results,
.item-search-results,
.cn-item-search-results {
  position: absolute !important;
  z-index: 500 !important;
  left: 0 !important;
  top: calc(100% + 1px) !important;
  width: 100% !important;
  min-width: 200px !important;
  max-width: min(380px, 92vw) !important;
  max-height: 200px !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
  background: #ffffff !important;
  background-image: none !important;
  border: 1px solid #c5ced6 !important;
  border-radius: 4px !important;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1) !important;
  -webkit-overflow-scrolling: touch;
}

/* Options are DIVS (not buttons) so ui-polish blue never applies */
body .item-search-results .item-search-option,
body .cn-item-search-results .item-search-option,
.item-search-results .item-search-option,
.cn-item-search-results .item-search-option {
  display: block !important;
  width: 100% !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  padding: 8px 10px !important;
  border: 0 !important;
  border-bottom: 1px solid #eceff1 !important;
  border-radius: 0 !important;
  background: #ffffff !important;
  background-image: none !important;
  color: #6b7a86 !important;
  font: 13px/1.35 Arial, Helvetica, sans-serif !important;
  font-weight: 400 !important;
  text-align: left !important;
  text-shadow: none !important;
  box-shadow: none !important;
  cursor: pointer !important;
  min-height: 0 !important;
  height: auto !important;
  transform: none !important;
  letter-spacing: normal !important;
}

body .item-search-results .item-search-option:last-child,
.item-search-results .item-search-option:last-child {
  border-bottom: 0 !important;
}

body .item-search-results .item-search-option:hover,
body .item-search-results .item-search-option.is-active,
body .cn-item-search-results .item-search-option:hover,
body .cn-item-search-results .item-search-option.is-active,
.item-search-results .item-search-option:hover,
.item-search-results .item-search-option.is-active {
  background: #f3f5f6 !important;
  background-image: none !important;
  color: #5a6a76 !important;
  box-shadow: none !important;
  transform: none !important;
}

body .item-search-results .item-search-empty,
.item-search-results .item-search-empty {
  padding: 8px 10px !important;
  background: #ffffff !important;
  color: #8a98a3 !important;
  font-size: 13px !important;
  font-weight: 400 !important;
}

/* Legacy button options — force white/grey if any remain */
body .item-search-results button,
body .cn-item-search-results button,
body.admin-mode .item-search-results button,
body.admin-mode .form-grid .item-search-results button,
body.admin-mode .quote-form-panel .item-search-results button {
  display: block !important;
  width: 100% !important;
  min-height: 0 !important;
  height: auto !important;
  margin: 0 !important;
  padding: 8px 10px !important;
  text-align: left !important;
  border: 0 !important;
  border-bottom: 1px solid #eceff1 !important;
  border-radius: 0 !important;
  background: #ffffff !important;
  background-image: none !important;
  color: #6b7a86 !important;
  box-shadow: none !important;
  text-shadow: none !important;
  font: 13px/1.35 Arial, Helvetica, sans-serif !important;
  font-weight: 400 !important;
  transform: none !important;
  transition: none !important;
  letter-spacing: normal !important;
  gap: 0 !important;
  justify-content: flex-start !important;
  align-items: flex-start !important;
}

body .item-search-results button:hover,
body .item-search-results button:focus,
body .item-search-results button:active,
body .item-search-results button.is-active,
body.admin-mode .item-search-results button:hover,
body.admin-mode .item-search-results button:active {
  background: #f3f5f6 !important;
  background-image: none !important;
  color: #5a6a76 !important;
  box-shadow: none !important;
  transform: none !important;
  border-radius: 0 !important;
  filter: none !important;
}
