/* Lens Configuration summary block — used on cart, mini-cart, checkout review,
 * admin order edit screen, and customer account order details. Email rendering
 * uses inline styles (see templates/lens-summary-email.php).
 *
 * NOTE: every inner selector is scoped under `.olc-lens-summary` to bump
 * specificity above WC admin (`.wc-order-item-meta`) and theme styles that
 * otherwise override the table cells. */

.olc-lens-summary {
  margin: 12px 0;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
  font-family: inherit;
  font-size: 13px;
  color: #1e293b;
  background: #fff;
  box-sizing: border-box;
}

.olc-lens-summary .olc-lens-summary__title {
  background: #f1f5f9;
  padding: 10px 14px;
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #475569;
  border-bottom: 1px solid #e2e8f0;
}

.olc-lens-summary .olc-lens-summary__table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
  background: transparent;
  table-layout: auto;
}

.olc-lens-summary .olc-lens-summary__table th,
.olc-lens-summary .olc-lens-summary__table td {
  padding: 10px 14px !important;
  border-bottom: 1px solid #e2e8f0;
  font-size: 13px;
  vertical-align: top;
  text-align: left;
  background: transparent;
  line-height: 1.5;
}

.olc-lens-summary .olc-lens-summary__table th {
  font-weight: 600;
  color: #475569;
  width: 40%;
  white-space: nowrap;
}

.olc-lens-summary .olc-lens-summary__table td {
  color: #1e293b;
}

.olc-lens-summary .olc-lens-summary__table tr:last-child th,
.olc-lens-summary .olc-lens-summary__table tr:last-child td {
  border-bottom: 0;
}

.olc-lens-summary .olc-lens-summary__sub th {
  background: #f8fafc;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
  font-weight: 700;
  padding: 8px 14px !important;
  width: auto;
}

.olc-lens-summary .olc-lens-summary__total th {
  color: #dc2626;
}
.olc-lens-summary .olc-lens-summary__total td {
  color: #dc2626;
  font-weight: 700;
}

.olc-lens-summary a {
  color: #0f766e;
  text-decoration: underline;
}
.olc-lens-summary a:hover { color: #0d5e58; }

/* Mini-cart: compact layout for narrow widget popovers (Woohoo/Phox/default). */
.olc-lens-summary--mini-cart {
  margin: 6px 0;
  font-size: 12px;
}
.olc-lens-summary--mini-cart .olc-lens-summary__title { padding: 6px 10px; font-size: 11px; }
.olc-lens-summary--mini-cart .olc-lens-summary__table th,
.olc-lens-summary--mini-cart .olc-lens-summary__table td { padding: 6px 10px !important; font-size: 12px; }
.olc-lens-summary--mini-cart .olc-lens-summary__table th { width: 45%; }

/* Admin order screen: inherit dashboard sans-serif. */
.olc-lens-summary--admin {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ---------------------------------------------------------------------------
 * Compact text layout — used ONLY on cart, mini-cart, and checkout review.
 * Other surfaces (my-account, order-received, admin) use .olc-lens-summary above.
 * --------------------------------------------------------------------------- */
.olc-cart-summary {
  margin: 12px 0;
  padding: 14px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.55;
  color: #1e293b;
  background: #fff;
  box-sizing: border-box;
}
.olc-cart-summary .olc-cart-summary__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid #e2e8f0;
}
.olc-cart-summary .olc-cart-summary__title {
  font-size: 14px;
  font-weight: 700;
  color: #1e293b;
}
.olc-cart-summary .olc-cart-summary__sub-title {
  font-size: 13px;
  color: #94a3b8;
  margin-top: 2px;
}
.olc-cart-summary .olc-cart-summary__addon {
  font-size: 14px;
  font-weight: 700;
  color: #1e293b;
  white-space: nowrap;
  text-align: right;
}
.olc-cart-summary .olc-cart-summary__addon .amount,
.olc-cart-summary .olc-cart-summary__addon bdi { color: inherit; font-weight: inherit; }
.olc-cart-summary .olc-cart-summary__lines {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  color: #475569;
}
.olc-cart-summary .olc-cart-summary__lines > div { color: inherit; }
.olc-cart-summary .olc-cart-summary__rx {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-variant-numeric: tabular-nums;
}
.olc-cart-summary .olc-cart-summary__rx-line {
  font-size: 13px;
  font-weight: 500;
  color: #1e293b;
}
.olc-cart-summary a {
  color: #0f766e;
  text-decoration: underline;
}
.olc-cart-summary a:hover { color: #0d5e58; }

/* Mini-cart popover: tighter padding + smaller type. */
.olc-cart-summary--mini-cart {
  margin: 6px 0;
  padding: 10px 12px;
  font-size: 12px;
}
.olc-cart-summary--mini-cart .olc-cart-summary__title { font-size: 13px; }
.olc-cart-summary--mini-cart .olc-cart-summary__sub-title,
.olc-cart-summary--mini-cart .olc-cart-summary__lines,
.olc-cart-summary--mini-cart .olc-cart-summary__rx-line { font-size: 12px; }

/* Cart + Checkout review: strip the card framing so the summary blends into
 * the host cell. Inner head divider + spacing stay intact for hierarchy. */
.olc-cart-summary--cart,
.olc-cart-summary--checkout {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

/* Cart + Checkout review: let text inherit the theme's normal table typography
 * (no muted greys, no custom sizes). Title + addon stay bold for hierarchy. */
.olc-cart-summary--cart,
.olc-cart-summary--cart .olc-cart-summary__title,
.olc-cart-summary--cart .olc-cart-summary__sub-title,
.olc-cart-summary--cart .olc-cart-summary__addon,
.olc-cart-summary--cart .olc-cart-summary__lines,
.olc-cart-summary--cart .olc-cart-summary__lines > div,
.olc-cart-summary--cart .olc-cart-summary__rx,
.olc-cart-summary--cart .olc-cart-summary__rx-line,
.olc-cart-summary--checkout,
.olc-cart-summary--checkout .olc-cart-summary__title,
.olc-cart-summary--checkout .olc-cart-summary__sub-title,
.olc-cart-summary--checkout .olc-cart-summary__addon,
.olc-cart-summary--checkout .olc-cart-summary__lines,
.olc-cart-summary--checkout .olc-cart-summary__lines > div,
.olc-cart-summary--checkout .olc-cart-summary__rx,
.olc-cart-summary--checkout .olc-cart-summary__rx-line {
  color: inherit;
  font-size: inherit;
  font-weight: normal;
}
.olc-cart-summary--cart .olc-cart-summary__title,
.olc-cart-summary--cart .olc-cart-summary__addon,
.olc-cart-summary--checkout .olc-cart-summary__title,
.olc-cart-summary--checkout .olc-cart-summary__addon {
  font-weight: 700;
}
.olc-cart-summary--cart .olc-cart-summary__sub-title,
.olc-cart-summary--cart .olc-cart-summary__lines,
.olc-cart-summary--cart .olc-cart-summary__lines > div,
.olc-cart-summary--checkout .olc-cart-summary__sub-title,
.olc-cart-summary--checkout .olc-cart-summary__lines,
.olc-cart-summary--checkout .olc-cart-summary__lines > div {
  color: #666;
}

/* WC injects an empty-key <dt class="variation-">:</dt> ahead of every
 * variation entry. Our summary supplies its own title, so the bare colon is
 * noise — hide it across all surfaces where the summary appears. */
dl.variation dt.variation- {
  display: none !important;
}

/* Cart + Checkout review row cells: top-align so the summary (taller content)
 * doesn't push price/qty/subtotal to vertical center. */
.woocommerce-cart-form table.cart tr.cart_item td,
.woocommerce-checkout-review-order-table tr.cart_item td {
  vertical-align: top;
}

/* Override Breakdance theme: it sets `word-break: break-all` on variation
 * lists which splits words mid-letter. Restore normal wrapping. */
.breakdance-woocommerce dl.variation,
.breakdance-woocommerce dl.variation dt,
.breakdance-woocommerce dl.variation dd,
.bde-mini-cart .variation,
.bde-mini-cart .variation dt,
.bde-mini-cart .variation dd {
  word-break: normal;
  overflow-wrap: anywhere;
}
