@scope (.kirana-pricing) {
/* =========================================================
   Your Estimate - premium quotation / checkout summary
   ========================================================= */

/* Keep sticky working inside calculator only */
.calc-section,
.calc-section > .container,
.calculator-layout {
  overflow: visible;
}

.calculator-layout {
  grid-template-columns: minmax(0, 1fr) minmax(340px, 400px);
  align-items: stretch;
}

.calculator-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.calculator-main .calc-progress-wrap {
  margin: 0;
  max-width: none;
}

/* Stretch with the left column so sticky releases at section end */
.estimate-slot {
  position: relative;
  align-self: stretch;
  width: 100%;
  min-width: 0;
  min-height: 100%;
}

.summary-card.estimate-premium,
.summary-card.estimate-premium.invoice-card {
  position: sticky;
  top: var(--estimate-sticky-top, 5.75rem);
  width: 100%;
  margin-top: 0;
  padding: 22px 20px 18px;
  border-radius: 0;
  border: 1px solid rgba(148, 163, 184, 0.16);
  /* One solid surface - avoids glass-on-white “double card” */
  background: #ffffff;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
  transition: box-shadow 0.28s ease;
  max-height: calc(100dvh - var(--estimate-sticky-top, 5.75rem) - 0.75rem);
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.45) transparent;
  z-index: 5;
  isolation: isolate;
}

/* Kill decorative outer glow layer that reads as a second card */
.summary-card.estimate-premium::before {
  display: none !important;
  content: none !important;
}

.summary-card.estimate-premium::-webkit-scrollbar {
  width: 6px;
}

.summary-card.estimate-premium::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.45);
  border-radius: 0;
}

.summary-card.estimate-premium::-webkit-scrollbar-track {
  background: transparent;
}

.summary-card.estimate-premium.is-pinned {
  position: sticky !important;
  top: var(--estimate-sticky-top, 5.75rem) !important;
  left: auto !important;
  width: 100% !important;
  z-index: 5;
}

.summary-card.estimate-premium:hover {
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.1);
}

.summary-card.estimate-premium::before {
  background:
    radial-gradient(ellipse 70% 40% at 100% 0%, rgba(37, 99, 235, 0.12), transparent 55%),
    radial-gradient(ellipse 55% 35% at 0% 100%, rgba(251, 191, 36, 0.08), transparent 50%);
}

/* Header */
.estimate-premium .est-head {
  gap: 6px;
  margin-bottom: 16px;
}

.est-kicker {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #64748B;
}

.estimate-premium .est-head h3 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #0F172A;
  line-height: 1.2;
}

.est-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  margin-top: 8px;
}

.est-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.est-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
  transition: opacity 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.est-badge-selected {
  background: rgba(37, 99, 235, 0.1);
  color: #1D4ED8;
  border: 1px solid rgba(37, 99, 235, 0.18);
}

.est-badge-recommend {
  background: rgba(251, 191, 36, 0.14);
  color: #B45309;
  border: 1px solid rgba(251, 191, 36, 0.28);
}

.est-badge-recommend[hidden] {
  display: none !important;
}

.est-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.68rem;
  font-weight: 600;
  color: #64748B;
}

.est-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22C55E;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.45);
  animation: est-pulse 2s ease infinite;
}

@keyframes est-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4); }
  50% { box-shadow: 0 0 0 5px rgba(34, 197, 94, 0); }
}

/* Line items */
.estimate-premium .invoice-body.is-updating {
  opacity: 1;
  transform: none;
}

.estimate-premium .est-lines {
  display: grid;
  gap: 2px;
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
}

.estimate-premium .est-lines > li {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 11px 8px;
  margin: 0;
  border: 1px solid transparent;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 12px;
  font-size: 0.86rem;
  color: #334155;
  transition: background 0.25s ease, border-color 0.25s ease, opacity 0.25s ease;
}

.estimate-premium .est-lines > li:last-child {
  border-bottom-color: transparent;
}

.estimate-premium .est-lines > li.is-selected {
  background: rgba(37, 99, 235, 0.035);
}

.estimate-premium .est-lines > li.is-muted {
  opacity: 0.72;
}

.estimate-premium .est-lines > li.is-flash {
  background: rgba(37, 99, 235, 0.08);
  border-color: rgba(37, 99, 235, 0.14);
}

.est-line-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  color: #2563EB;
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.1);
  flex-shrink: 0;
}

.est-lines > li.is-muted .est-line-icon {
  color: #94A3B8;
  background: rgba(148, 163, 184, 0.1);
  border-color: rgba(148, 163, 184, 0.14);
}

.est-line-icon.gold {
  color: #D97706;
  background: rgba(251, 191, 36, 0.12);
  border-color: rgba(251, 191, 36, 0.2);
}

.est-line-icon.green {
  color: #16A34A;
  background: rgba(22, 163, 74, 0.1);
  border-color: rgba(22, 163, 74, 0.16);
}

.est-line-copy {
  min-width: 0;
}

.est-line-copy strong {
  display: block;
  font-size: 0.86rem;
  font-weight: 600;
  color: #0F172A;
  letter-spacing: -0.01em;
  margin-bottom: 1px;
}

.est-line-copy em {
  display: block;
  font-style: normal;
  font-size: 0.72rem;
  font-weight: 500;
  color: #64748B;
  line-height: 1.3;
}

.est-lines > li.is-muted .est-line-copy strong {
  color: #64748B;
}

.est-line-price {
  font-size: 0.9rem;
  font-weight: 700;
  color: #2563EB;
  letter-spacing: 0.04em;
  white-space: nowrap;
  text-align: right;
  font-variant-numeric: tabular-nums lining-nums;
}

.est-line-price small {
  font-size: 0.68rem;
  font-weight: 600;
  color: #64748B;
  margin-left: 2px;
}

.est-lines > li.is-muted .est-line-price {
  color: #94A3B8;
  font-weight: 600;
}

.est-charge-tag {
  display: inline-block;
  position: static;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  vertical-align: middle;
  text-transform: uppercase;
  background: rgba(37, 99, 235, 0.1);
  color: #1D4ED8;
}

.est-charge-tag.yearly {
  background: rgba(245, 158, 11, 0.14);
  color: #B45309;
}

.est-charge-inline {
  display: inline-block;
  margin-left: 4px;
  font-style: normal;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #2563EB;
}

.est-charge-inline.yearly {
  color: #D97706;
}

.est-price-rows .est-price-split {
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px dashed rgba(148, 163, 184, 0.28);
  font-weight: 600;
  color: #334155;
}

.est-price-rows .est-price-split.yearly {
  border-top: none;
  margin-top: 0;
  padding-top: 2px;
  color: #92400E;
}

.est-price-rows .est-price-split.yearly strong {
  color: #B45309;
}

.est-price-rows strong small {
  font-size: 0.65rem;
  font-weight: 600;
  color: #64748B;
  margin-left: 2px;
}

/* App status pill */
.estimate-premium .est-app-status {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 8px;
  width: 100%;
  margin: 0 0 14px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(22, 163, 74, 0.08);
  border: 1px solid rgba(22, 163, 74, 0.18);
  color: #166534;
  font-size: 0.78rem;
  font-weight: 600;
}

.estimate-premium .est-app-status i {
  color: #16A34A;
  font-size: 0.85rem;
}

.estimate-premium .est-app-status strong {
  margin-left: auto;
  color: #15803D;
  font-size: 0.8rem;
}

.estimate-premium .est-app-status[hidden] {
  display: none !important;
}

/* Price summary */
.est-price-summary {
  margin: 0 0 14px;
  padding: 14px 12px 12px;
  border-radius: 0;
  background: rgba(248, 250, 252, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.est-section-label {
  margin: 0 0 10px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #64748B;
}

.est-price-rows {
  display: grid;
  gap: 7px;
  margin-bottom: 10px;
}

.est-price-rows div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-size: 0.8rem;
  color: #64748B;
}

.est-price-rows strong {
  font-weight: 600;
  color: #0F172A;
  letter-spacing: -0.015em;
}

.est-price-total-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  font-size: 0.86rem;
  font-weight: 600;
  color: #0F172A;
}

.est-price-total-row strong {
  color: #2563EB;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.est-gst-badge {
  display: inline-flex;
  margin-top: 10px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 600;
  color: #475569;
  background: rgba(148, 163, 184, 0.14);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

/* Grand total */
.estimate-premium .est-grand {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 16px 18px;
  margin-bottom: 14px;
  border-radius: 0;
  overflow: hidden;
  background: linear-gradient(135deg, #1D4ED8 0%, #2563EB 55%, #3B82F6 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.22) inset,
    0 14px 32px rgba(37, 99, 235, 0.32);
  color: #fff;
}

.est-grand-label {
  font-size: 0.68rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.88 !important;
}

.estimate-premium .est-grand strong {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.1;
  color: #fff;
  font-variant-numeric: tabular-nums lining-nums;
}

.est-grand-note {
  font-style: normal;
  font-size: 0.72rem;
  font-weight: 500;
  opacity: 0.85;
}

.estimate-premium .est-grand.is-glow::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.22) 50%, transparent 65%);
  transform: translateX(-120%);
  animation: est-shine 0.7s ease;
  pointer-events: none;
}

@keyframes est-shine {
  to { transform: translateX(120%); }
}

/* Value + disclaimer */
.est-value-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 0 0 8px;
  padding: 0;
  list-style: none;
}

.est-value-row li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #334155;
}

.est-value-row i {
  color: #16A34A;
  font-size: 0.7rem;
}

.estimate-premium .est-disclaimer {
  margin: 0 0 10px;
  font-size: 0.72rem;
  line-height: 1.4;
  color: #475569;
}

/* CTAs */
.estimate-premium .est-actions {
  gap: 6px;
}

.estimate-premium .est-actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 38px;
  height: 38px;
  padding: 0 12px;
  border-radius: 0;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1;
  box-shadow: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.estimate-premium .est-actions .btn:hover {
  transform: translateY(-2px);
}

.estimate-premium .est-actions .btn:active {
  transform: translateY(0) scale(0.98);
}

.estimate-premium .est-btn-primary {
  box-shadow: 0 6px 14px rgba(37, 99, 235, 0.22);
}

.estimate-premium .est-btn-primary .fa-arrow-right {
  font-size: 0.7rem;
  transition: transform 0.2s ease;
}

.estimate-premium .est-btn-primary:hover .fa-arrow-right {
  transform: translateX(3px);
}

.estimate-premium .est-btn-download {
  background: #fff;
  border-color: rgba(37, 99, 235, 0.28);
  color: #2563EB;
}

.estimate-premium .est-btn-download .fa-file-pdf {
  transition: transform 0.2s ease;
}

.estimate-premium .est-btn-download:hover .fa-file-pdf {
  transform: translateY(2px);
}

.estimate-premium .est-btn-whatsapp {
  background: #16A34A;
  border-color: #16A34A;
  box-shadow: 0 5px 12px rgba(22, 163, 74, 0.18);
}

.estimate-premium .est-btn-whatsapp:hover {
  background: #15803D;
}

.estimate-premium .est-btn-whatsapp .fa-whatsapp {
  transition: transform 0.2s ease;
}

.estimate-premium .est-btn-whatsapp:hover .fa-whatsapp {
  transform: scale(1.08);
}

/* Trust footer */
.est-trust-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 12px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
}

.est-trust-footer span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.68rem;
  font-weight: 600;
  color: #94A3B8;
}

.est-trust-footer i {
  font-size: 0.65rem;
  color: #64748B;
}

@media (max-width: 980px) {
  .calculator-layout {
    grid-template-columns: 1fr;
  }

  .estimate-slot,
  .summary-card.estimate-premium {
    position: static;
    top: auto;
    left: auto;
    width: 100% !important;
    max-height: none !important;
    overflow: visible !important;
    order: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .est-live-dot,
  .estimate-premium .est-grand.is-glow::after {
    animation: none !important;
  }

  .estimate-premium .est-actions .btn:hover,
  .estimate-premium .est-actions .btn:active {
    transform: none;
  }
}

}
