/* Woo Bundle Builder Lite – Polished Modal UI (steppers + adaptive mini-cart) */

/* ---------- Modal shell ---------- */
.wbbll-modal[aria-hidden="true"] { display: none; }
.wbbll-modal.is-open { display: block; }
.wbbll-modal {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(18, 18, 18, 0.55);
  display: none;
}

/* Hide plus/minus only on desktop (≥1024px) */
@media screen and (min-width: 1024px) {
  .plus {
    display: none !important;
  }
  .minus {
    display: none !important;
  }
}


.wbbll-dialog {
  position: relative;
  background: #fff;
  max-width: 1080px;
  margin: 32px auto;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,0.25);
}

/* ---------- Header ---------- */
.wbbll-header {
  padding: 14px 18px;
  border-bottom: 1px solid #ebedf0;
  background: #fafbfc;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.wbbll-title {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
  flex: 0 0 auto;
}
.wbbll-pillbar {
  display: flex; gap: 8px; align-items: center; flex: 1 1 auto; flex-wrap: wrap;
}
.wbbll-pill {
  font-size: 12px; line-height: 1;
  border: 1px solid #e3e6ea; color: #444;
  padding: 7px 10px; border-radius: 999px; background: #fff;
}
.wbbll-pill.current { background: #111827; border-color: #111827; color: #fff; }
.wbbll-close {
  margin-left: auto;
  text-decoration: none;
  font-size: 22px; line-height: 1;
  color: #6b7280; padding: 2px 6px; border-radius: 8px;
}
.wbbll-close:hover { background: #f3f4f6; color: #111827; }

/* ---------- Body layout ---------- */
.wbbll-body {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 0;
  min-height: 420px;
}

.wbbll-main {
  padding: 16px;
  overflow-y: auto;
  max-height: calc(80vh - 132px);
}

/* Sidebar (desktop) */
.wbbll-aside {
  border-left: 1px solid #f0f1f3;
  padding: 16px;
  background: #fcfcfd;
  position: relative;
}

/* Mobile drawer */
.wbbll-aside.as-drawer {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  border-left: none; border-top: 1px solid #e9eaee;
  background: #fff;
  transform: translateY(65%);
  transition: transform .22s ease;
  padding-bottom: 78px; /* space for footer buttons */
  max-height: 70vh; overflow: auto;
}
.wbbll-aside.as-drawer.open { transform: translateY(0%); }
.wbbll-drawer-toggle {
  display: none;
  position: absolute; top: -36px; left: 50%; transform: translateX(-50%);
  padding: 6px 12px; font-size: 13px; background: #111827; color: #fff; border-radius: 999px;
}
.wbbll-aside.as-drawer .wbbll-drawer-toggle { display: inline-block; }

/* ---------- Step ---------- */
.wbbll-step { display: none; }
.wbbll-step h5 {
  margin: 0 0 6px; font-size: 16px; font-weight: 600;
}
.wbbll-remaining {
  margin: 0 0 14px;
  font-size: 12px; color: #6b7280;
}

/* Product list */
.wbbll-products { display: grid; grid-template-columns: 1fr; gap: 12px; }

/* Card per line */
.wbbll-card {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
}
.wbbll-card:hover { border-color: #d1d5db; background: #fafafa; }
.wbbll-card .wbbll-media img {
  width: 64px; height: 64px; border-radius: 8px; object-fit: cover; background: #f3f4f6;
}
.wbbll-card .wbbll-line { display: flex; align-items: center; gap: 8px; }
.wbbll-card .wbbll-name { font-weight: 600; }
.wbbll-card .wbbll-price { font-size: 12px; color: #6b7280; }
.wbbll-card .wbbll-price .val { white-space: nowrap; }

/* Attribute group block (for variable/custom) */
.wbbll-attrs {
  grid-column: 1 / -1;
  display: flex; gap: 10px; margin-top: 6px; justify-content: space-between;
}
a.button { max-width: 30%; }
.wbbll-attr { width: 30%; }
.wbbll-attr label { display: flex; align-items: baseline; gap: 6px; font-weight: 600; font-size: 13px; }
.wbbll-attr select {
  width: 100%; border: 1px solid #d1d5db; border-radius: 8px; padding: 8px; font-size: 14px; background: #fff;
}
.wbbll-attr-delta { font-weight: 500; color: #065f46; font-size: 12px; }

/* Lines (custom items with attribute groups -> per selection row) */
.wbbll-lines { grid-column: 1 / -1; display: grid; gap: 8px; }
.wbbll-line-row {
  display: grid; grid-template-columns: 1fr auto auto;
  gap: 10px; align-items: center;
  background: #f9fafb; border: 1px dashed #e5e7eb; border-radius: 10px; padding: 8px 10px;
}
.wbbll-line-label { font-size: 13px; color: #111827; }
.wbbll-remove-line { text-decoration: none; color: #b91c1c; font-size: 18px; padding: 0 6px; }
.wbbll-remove-line:hover { color: #7f1d1d; }

/* Qty steppers (unified) */
.wbbll-qty { display: inline-flex; align-items: center; gap: 6px; }
.wbbll-qty button {
  appearance: none; border: 1px solid #d1d5db; background: #fff;
  border-radius: 8px; width: 34px; height: 34px; font-size: 16px; cursor: pointer; padding: 5px;
}
.wbbll-qty button:disabled { opacity: .5; cursor: default; }
.wbbll-qty input[type="number"] {
  width: 56px; text-align: center; border: 1px solid #d1d5db; border-radius: 8px; height: 34px; font-size: 14px;
}
.wbbll-card .wbbll-qty { justify-self: end; }

/* Buttons (modal actions) */
.wbbll-btn {
  border: 1px solid #d1d5db; background: #fff; color: #111827;
  padding: 10px 14px; border-radius: 10px; font-weight: 600; cursor: pointer; min-width: 140px;
}
.wbbll-btn.primary { background: #111827; color: #fff; border-color: #111827; }
.wbbll-btn:disabled { opacity:.6; cursor: default; }
.wbbll-actions .wbbll-btn { width: 100%; }

/* ---------- Footer (sticky within dialog) ---------- */
.wbbll-footer {
  position: sticky; bottom: 0; z-index: 2;
  display: grid; grid-template-columns: 1fr 360px; gap: 14px;
  padding: 12px 16px; border-top: 1px solid #ebedf0; background: #fff;
}
.wbbll-total { align-self: center; font-weight: 600; }
.wbbll-total .disc { font-weight: 500; color: #047857; }

/* ---------- Sidebar content ---------- */
.wbbll-aside h6 { margin: 0 0 10px; font-size: 14px; font-weight: 700; }
.wbbll-summary-list { display: none; } /* placeholder anchor */
.wbbll-progress { display: grid; gap: 10px; }
.wbbll-sum-block { border: 1px solid #e5e7eb; border-radius: 10px; background: #fff; }
.wbbll-sum-head { padding: 8px 10px; border-bottom: 1px solid #f1f3f5; font-size: 13px; background: #f9fafb; }
.wbbll-sum-list { list-style: none; margin: 0; padding: 10px; display: grid; gap: 6px; }
.wbbll-sum-list li { display: flex; gap: 6px; font-size: 13px; color: #111827; }
.wbbll-sum-qty { color: #6b7280; }
.wbbll-sum-empty { padding: 10px; color: #6b7280; font-size: 12px; }

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
  .wbbll-dialog { margin: 0; border-radius: 0; max-width: none; height: 100vh; display: flex; flex-direction: column; }
  .wbbll-main { max-height: none; height: calc(100vh - 160px); }
  .wbbll-body { grid-template-columns: 1fr; }
  .wbbll-footer { grid-template-columns: 1fr; gap: 10px; }
  .wbbll-aside { border-left: none; }
  .wbbll-drawer-toggle { display: inline-block; }
}

/* Subtle focus states */
.wbbll-card:focus-within, .wbbll-attr select:focus, .wbbll-qty button:focus, .wbbll-qty input:focus {
  outline: 2px solid #11182722; outline-offset: 2px;
}
