/* ================================
   BPCO — Amount Chip + Bill Summary
   (UI only; no layout assumptions beyond IDs/classes below)
   ================================ */

/* ----- Amount Chip (trigger) ----- */

#bpco-amount-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;   /* left cluster vs chevron */
  gap: 14px;
  padding: 6px 6px;
  border: 1px solid #E6E6E6;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
  cursor: pointer;
  user-select: none;
  margin: 4px 6px 100px 6px;
}

#bpco-amount-chip:active {
  transform: translateY(0.5px);
}

.bpco-amount-left {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-auto-rows: auto;
  column-gap: 12px;
  row-gap: 8px;
  align-items: center;
}

.bpco-amount-icon {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #1A8F3A; /* green */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex: 0 0 28px;
  transform: translateY(1px);
}

/* If you render a glyph via <svg class="bpco-amount-glyph"> inside .bpco-amount-icon */
.bpco-amount-glyph {
  width: 16px;
  height: 16px;
  display: block;
  fill: currentColor;
}

.bpco-amount-title {
  font-size: 16px;
  line-height: 1.2;
  font-weight: 600;
  color: #222;
}

/* Title row holds: "To Pay" + inline prices block */
.bpco-amount-row1 {
  display: inline-flex;
  align-items: baseline;
  gap: 10px; /* between title block and prices block */
}

/* Prices cluster: MRP (strike) + final */
.bpco-amount-prices {
  display: inline-flex;
  align-items: baseline;
  gap: 10px; /* 4–5px min; kept 10px for clarity on HDPI; adjust if needed */
}

.bpco-amount-mrp {
  color: #9AA0A6;
  font-size: 14px;    /* smaller than final */
  font-weight: 400;
  position: relative;
}
.bpco-amount-mrp s {
  text-decoration: none;
  position: relative;
}
.bpco-amount-mrp s::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  top: 50%;
  border-top: 2px solid currentColor;
  transform: translateY(-50%);
}

.bpco-amount-final {
  color: orangered;
  font-size: 16px;    /* ~2px bigger than MRP */
  font-weight: 700;
}

/* Second row: saving chip (if any) */
.bpco-amount-row2 {
  grid-column: 2 / -1;   /* aligns under text (not under icon) */
}

.bpco-saving-chip {
  display: inline-block;
  background: #E7F7EC;
  color: #1A8F3A;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  line-height: 1;
  font-weight: 600;
}

/* Right chevron */
.bpco-amount-chevron {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: #1F1F1F;
}

/* Compact responsiveness */
@media (max-width: 360px) {
  .bpco-amount-final { font-size: 17px; }
  .bpco-amount-mrp   { font-size: 13px; }
}

/* ----- Bill Summary (bottom sheet) ----- */

/* Expect markup similar to existing modals: <div id="bpco-bill-modal" class="bpco-modal">… */
#bpco-bill-modal.bpco-modal {
  /* rely on existing modal overlay styles in plugin */
}

#bpco-bill-modal .bpco-modal-dialog {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 5px;
  border-radius: 30px 30px 0 0;
  overflow: hidden;
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  background: #fff;
  box-shadow: 0 -10px 30px rgba(0,0,0,0.12);
  background-color: #a3fdb6;
}

/* Header: title left, X right */
#bpco-bill-modal .bpco-bill-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 12px;
  border-bottom: 1px solid #EEE;
}
#bpco-bill-modal .bpco-bill-title {
  font-size: 18px;
  font-weight: 700;
  color: #222;
}
#bpco-bill-modal .bpco-bill-close {
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  color: #333;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

/* Content list */
#bpco-bill-modal .bpco-bill-body {
  max-height: min(70vh, 520px);
  overflow: auto;
  padding: 10px 16px 16px;
  background-color: white;
}

.bpco-bill-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 4px;
  gap: 10px;
}
.bpco-bill-label {
  color: #222;
  font-size: 12px;
  font-weight: 500;
}
.bpco-bill-amount {
  color: #222;
  font-size: 12px;
  font-weight: 600;
  text-align: right;
}

/* Discount row (negative, green) */
.bpco-bill-row.is-discount .bpco-bill-label,
.bpco-bill-row.is-discount .bpco-bill-amount {
  color: #1A8F3A;
}

/* MRP struck helper (if you show original fee in popup) */
.bpco-strike {
  color: #9AA0A6;
  position: relative;
}
.bpco-strike::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  top: 50%;
  border-top: 2px solid currentColor;
  transform: translateY(-50%);
}

/* To Pay (emphasis) */
.bpco-bill-total {
  border-top: 1px dashed #E3E3E3;
  margin-top: 4px;
  padding-top: 12px;
}
.bpco-bill-total .bpco-bill-label {
  font-weight: 700;
}
.bpco-bill-total .bpco-bill-amount {
  font-size: 15px;
  font-weight: 700;
  color:orangered;
}

/* Subline directly under To Pay */
.bpco-bill-subline {
  margin-top: 6px;
  color: #6A6A6A;
  font-size: 13px;
}

/* Modal open state (plugin already handles .bpco-open) */
#bpco-bill-modal.bpco-open .bpco-modal-dialog {
  animation: bpco-sheet-in 200ms ease-out both;
}
@keyframes bpco-sheet-in {
  from { transform: translate(-50%, 12px); opacity: 0; }
  to   { transform: translate(-50%, 0); opacity: 1; }
}

/* Bring bill modal above sticky header/footer */
#bpco-bill-modal.bpco-zmax { z-index: 999999 !important; }

