/* ===== Page-level full-height & theme skin ===== */
html, body { height: 100%; margin: 0; }
#product-builder-app, .builder-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: radial-gradient(1200px 800px at 10% -10%, #182446 0%, #0b1220 45%, #0b1220 100%);
  color: #eef3ff;
}

/* Shared wrapper */
.wrap { max-width: 1100px; margin: 0 auto; padding: 20px; }

/* ===== Hero ===== */
.builder-hero {
  position: relative;
  border-bottom: 1px solid #22304d;
  background: linear-gradient(180deg, #0b1220cc, #0b122000);
}
.hero-inner {
  display: flex;
  align-items: center;
  gap: 16px;
}
.logo {
  width: 44px; height: 44px; border-radius: 10px;
  background: linear-gradient(135deg, #4f7cff, #62e8c6);
  display: grid; place-items: center;
  font-weight: 800; color:#081224;
  box-shadow: 0 10px 24px rgba(79,124,255,.26);
}
.title { margin: 0; font-size: clamp(26px, 3vw, 34px); color: #fff; }
.tagline { margin: 4px 0 0; color: #9fb0d0; font-size: 14px; }

/* ===== Main builder area fills space ===== */
.builder-container { 
  flex: 1 0 auto;
  display: flex; flex-direction: column; align-items: center;
  padding: 20px 0 40px;
}

/* ===== Connector selection ===== */
.connector-selection { width: 100%; color:#eef3ff; }
.connector-selection h2 { margin: 10px 0; color:#fff; }

.select-box {
  width: 100%;
  max-width: 420px;
  background: #0f1930;
  color: #eef3ff;
  border: 1px solid #22304d;
  border-radius: 10px;
  padding: 12px 14px;
  outline: none;
}
.select-box:focus { box-shadow: 0 0 0 4px rgba(128,160,255,.4); }

.connector-list {
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-start;
  margin-top: 14px;
  background: linear-gradient(180deg, #121a2b, #0e1728);
  border: 1px solid #22304d;
  border-radius: 14px;
  padding: 10px;
  height: 30vh;
  overflow-y:auto;
  scrollbar-width: thin; scrollbar-color: #324569 #0e172b;
}
.connector-list::-webkit-scrollbar { width: 10px; height:10px; }
.connector-list::-webkit-scrollbar-thumb { background:#324569; border-radius:10px; }
.connector-list::-webkit-scrollbar-track { background:#0e172b; }

.connector-item {
  cursor: grab;
  padding: 10px 8px; margin: 4px;
  background: #0f1930;
  border: 1px solid #22304d;
  border-radius: 12px;
  text-align: center;
  height: 200px; width: 200px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  box-shadow: 0 6px 22px rgba(20,40,80,.10);
  transition: transform .12s ease, border-color .2s ease, box-shadow .2s ease;
}
.connector-item:hover { transform: translateY(-2px); border-color: #3b5aa0; box-shadow: 0 10px 26px rgba(20,40,80,.18); }
.connector-item img {
  width: 100%;               /* fill container width */
  height: 120px;             /* fixed height for consistency */
  object-fit: contain;       /* scale proportionally without cropping */
  display: block;
  margin: 0 auto 6px;
  background: #0e172b;       /* optional: consistent background */
  border-radius: 6px;        /* optional rounding */

 }
.connector-item p { font-size: 13px; font-weight: 600; color: #9fb0d0; margin: 0; }

/* ===== Builder row ===== */
.builder-template { width: 100%; margin-top: 24px; }
.builder-template h2 { color:#fff; margin: 0 0 10px; }
.builder-row {
  display: flex; justify-content: center; align-items: stretch; gap: 16px;
  background: linear-gradient(180deg, #121a2b, #0e1728);
  border: 1px solid #22304d;
  border-radius: 14px;
  padding: 20px; min-height: 330px;
}

/* ===== Slots (3-row grid) ===== */
.builder-slot {
  flex: 1;
  min-width: 340px;
  min-height: 330px;
  border: 2px dashed #324569; border-radius: 12px;
  background: #0b1426;
  display: grid;
  grid-template-rows: 10% 1fr 10%; /* top | middle | bottom */
  color: #9fb0d0;
  padding: 12px;
}
.builder-slot.disabled { opacity: .5; pointer-events: none; }

.slot-top, .slot-mid, .slot-bot {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.connector1 .slot-mid { justify-content: flex-end; text-align: right; }
.connector2 .slot-mid { justify-content: flex-start; text-align: left; }

/* ===== Selected item visuals ===== */
.selected-item { text-align: center; }
.selected-item img {
  width: 100%;               /* fill available slot width */
  max-width: 160px;          /* keeps them visually balanced */
  height: 120px;             /* fixed height for consistency */
  object-fit: contain;       /* prevents stretching or cropping */
  display: block;
  margin: 0 auto;
}

/* ===== Cable slot specifics ===== */
.builder-slot--cable .slot-top p { font-weight: 600; color: #fff; }

.builder-slot--cable .cable-visual {
  width: 100%; height: 100%;
  display: grid; place-items: center;
}
.builder-slot--cable .selected-line {
  min-height: 22px;
  color: #9fb0d0;
  opacity: .95;
}

.builder-slot--cable .slot-bot { padding-top: 6px; }
.cable-selection-nester {
  display: grid;
  grid-template-columns: 1fr 140px; /* select | length */
  gap: 12px;
  width: 100%;
}
.cable-selection-nester select,
.cable-selection-nester input[type="number"] {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #324569;
  background: #0f1930;
  color: #eef3ff;
}
.cable-selection-nester input[type="number"]::placeholder { color:#6f84aa; }

/* ===== Action buttons ===== */
.button-container {
  margin-top: 25px;
  display: flex;
  justify-content: center;
  gap: 20px;
  width: 100%;
}
.button-24 {
  border-radius: 10px; border: 1px solid #1450d9;
  background: #4f7cff; color: #fff; cursor: pointer;
  font: 800 15px/1 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  min-height: 40px; padding: 12px 14px;
  transition: background .15s ease, border-color .15s ease, transform .1s ease;
}
.button-24:hover { background: #3b66e3; border-color: #2f56cf; }
.button-24:active { transform: translateY(1px); }
.button-caution { background: #FF4742; border-color: #FF4742; }
.button-caution:hover { background:#ff5d59; border-color:#ff5d59; }
.button-true { background:#4f7cff; border-color:#1450d9; }
.button-true:hover { background:#3b66e3; border-color:#2f56cf; }

/* ===== Modal ===== */
.quote-modal {
  position: fixed; inset: 0; display: none;
  justify-content: center; align-items: center;
  background: rgba(8,18,36,.92);
  backdrop-filter: blur(4px) saturate(1.1);
  z-index: 9999;
}
.quote-modal.is-open { display: flex; }
.modal-content {
  background: linear-gradient(180deg, #121a2b, #0e1728);
  border: 1px solid #22304d; color: #eef3ff;
  padding: 22px; border-radius: 14px;
  width: 92%; max-width: 540px;
  box-shadow: 0 20px 60px rgba(20,40,80,.35);
}
.modal-content input, .modal-content textarea {
  width: 100%; margin: 8px 0 12px; padding: 10px;
  background:#0f1930; color:#eef3ff; border:1px solid #324569; border-radius: 10px;
}
.modal-content input::placeholder, .modal-content textarea::placeholder { color:#6f84aa; }
.modal-content button {
  margin-right: 10px; padding: 10px 16px; border-radius: 10px;
  border: 1px solid #1450d9; background:#4f7cff; color:#fff; cursor:pointer;
}
.modal-content button:last-child { background:#0f1930; color:#9fb0d0; border-color:#324569; }
.modal-content button:hover { background:#3b66e3; border-color:#2f56cf; }
.modal-content button:last-child:hover { background:#15213f; }

/* ===== Footer ===== */
.builder-foot {
  border-top: 1px solid #22304d;
  text-align: center; color: #9fb0d0;
  font-size: 13px; padding: 16px 20px;
}

.cable-warning {
  font-size: 14px;
  color:orange;
  font-style: italic;
}

.helper-text {
  margin: 8px 0 12px;
  font-size: 14px;
  color:orange;
  font-style: italic;
}


.length-input-wrap {
  display: flex;
  align-items: center;
  background: #0f1930;
  border: 1px solid #324569;
  border-radius: 10px;
  padding: 0 10px;
  color: #eef3ff;
}

.length-input-wrap input {
  background: transparent;
  border: none;
  outline: none;
  color: #eef3ff;
  width: 60px;
  padding: 10px;
}

.length-input-wrap .unit {
  font-size: 14px;
  color: #9fb0d0;
  margin-left: 4px;
}

.length-input-wrap input[type="number"] {
  border: none;
  background: transparent;
  box-shadow: none;
  outline: none;
  text-align: center; /* optional: makes the number look more inline */
  font-size: 14px;    
  color: #eef3ff;     
     
}

