@scope (.kirana-pricing) {
/* =========================================================
   Premium Feature Comparison Modal v2
   Sticky chrome · Strong Business column · Faster scan
   ========================================================= */

.modal {
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: modalFadeIn 0.28s ease;
}

.modal:not([hidden]) {
  display: flex;
}

.modal-backdrop {
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.modal-panel.modal-panel-wide {
  width: min(92vw, 1480px);
  height: 90vh;
  max-height: 90vh;
  border-radius: 28px;
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid rgba(148, 163, 184, 0.18);
  /* backdrop-filter on rounded panels bleeds corners in Chromium */
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.2);
  position: relative;
  isolation: isolate;
  clip-path: inset(0 round 28px);
  -webkit-clip-path: inset(0 round 28px);
  animation: modalPop 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.modal-panel.modal-panel-wide::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    radial-gradient(ellipse 48% 36% at 8% 0%, rgba(37, 99, 235, 0.1), transparent 55%),
    radial-gradient(ellipse 42% 32% at 96% 100%, rgba(255, 193, 7, 0.12), transparent 50%);
  z-index: 0;
}

.modal-panel.modal-panel-wide > *:not(.modal-close) {
  position: relative;
  z-index: 1;
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modalPop {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.modal-panel.modal-panel-wide .modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  left: auto;
  width: 34px;
  height: 34px;
  margin: 0;
  padding: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
  font-size: 1.25rem;
  line-height: 1;
  color: var(--brand-heading);
  transition: transform 0.25s ease, background 0.2s ease;
  z-index: 20;
}

.modal-panel.modal-panel-wide .modal-close:hover {
  transform: rotate(90deg);
  background: #fff;
}

/* Sticky header - single compact row */
.compare-modal-head {
  flex: 0 0 auto;
  padding: 10px 52px 10px 20px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  background: #fff;
  border-radius: 28px 28px 0 0;
}

.compare-modal-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}

.compare-modal-head h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--brand-ink);
  margin: 0;
  padding-right: 0;
  line-height: 1.2;
}

.compare-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.compare-trust li {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--brand-heading);
  background: rgba(248, 250, 252, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 999px;
  padding: 2px 8px;
  min-height: 22px;
  line-height: 1;
}

.compare-trust li i {
  color: var(--green);
  font-size: 0.6rem;
}

/* Scrollable middle only */
.compare-table-wrap {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  margin: 0;
  padding: 0 10px 8px;
  max-height: none;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.compare-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 900px;
}

.compare-table thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  padding: 10px 10px 10px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  vertical-align: middle;
  height: auto;
  max-height: 90px;
}

.compare-table th:first-child,
.compare-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  background: rgba(255, 255, 255, 0.96);
  text-align: left;
  min-width: 250px;
  width: 32%;
}

.compare-table thead th:first-child { z-index: 4; }

.compare-table th:nth-child(2),
.compare-table th:nth-child(3),
.compare-table th:nth-child(4),
.compare-table td:nth-child(2),
.compare-table td:nth-child(3),
.compare-table td:nth-child(4) {
  text-align: center;
  width: 22.5%;
}

.plan-col-head {
  display: grid;
  gap: 4px;
  justify-items: center;
}

.plan-col-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 24px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: none;
  border-radius: 999px;
  padding: 0 9px;
  line-height: 1;
}

.plan-col-badge i {
  font-size: 0.7rem;
  line-height: 1;
}

.plan-col-badge.popular {
  background: linear-gradient(135deg, #2563EB, #3B82F6);
  color: #fff;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.22);
}

.plan-col-badge.popular i {
  color: #FDE68A;
}

.plan-col-badge.complete {
  background: linear-gradient(135deg, #0F172A, #1E293B);
  color: #fff;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.18);
}

.plan-col-badge.complete i {
  color: #FBBF24;
}

.plan-col-name {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--brand-ink);
  line-height: 1.2;
}

/* Strong Business column - continuous borders (no inset cuts) */
.compare-table th.col-business,
.compare-table td.col-business {
  background-color: rgba(37, 99, 235, 0.07);
  border-left: 2px solid #3B82F6;
  border-right: 2px solid #3B82F6;
  box-shadow: none;
}

.compare-table th.col-business {
  position: sticky;
  top: 0;
  z-index: 3;
  background:
    linear-gradient(180deg, rgba(37, 99, 235, 0.14), rgba(255, 255, 255, 0.97) 70%);
  border-top: 2px solid #3B82F6;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 12px 12px 0 0;
  box-shadow: none;
}

.compare-table td.col-business {
  /* Keep row divider inside the blue frame, not over it */
  border-bottom: 1px solid rgba(37, 99, 235, 0.12);
  box-shadow: none;
}

.compare-table tbody tr:last-child td.col-business {
  border-bottom: 2px solid #3B82F6;
  border-radius: 0 0 10px 10px;
}

.compare-table th.col-pro {
  background: linear-gradient(180deg, rgba(255, 193, 7, 0.16), rgba(255, 255, 255, 0.95) 70%);
}

.compare-table td.col-pro {
  background: rgba(255, 248, 230, 0.28);
}

.compare-table tbody tr:nth-child(even) td {
  background: #FAFBFC;
}

.compare-table tbody tr:nth-child(even) td.col-business {
  background: rgba(37, 99, 235, 0.08);
}

.compare-table tbody tr:hover td {
  background: rgba(37, 99, 235, 0.05);
}

.compare-table tbody tr:hover td.col-business {
  background: rgba(37, 99, 235, 0.12);
}

.compare-table td {
  padding: 12px 10px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
  vertical-align: middle;
}

/* Category label sits inside first feature of each section - no blank plan cells */
.group-start td {
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  padding-top: 14px;
}

.feature-group-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--brand-blue);
  margin-bottom: 2px;
}

.feature-group-label i {
  font-size: 0.62rem;
  opacity: 0.9;
}

/* Feature cells */
.feature-cell {
  display: grid;
  gap: 5px;
  text-align: left;
  position: relative;
}

.feature-cell strong {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--brand-heading);
}

.feature-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.feature-tags em {
  font-style: normal;
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--brand-grey-dark);
  background: rgba(148, 163, 184, 0.14);
  border-radius: 999px;
  padding: 2px 7px;
}

.feature-importance {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--brand-blue);
}

.feature-importance .stars {
  color: #F59E0B;
  letter-spacing: 0.5px;
  font-size: 0.58rem;
}

.feature-importance.essential { color: #15803d; }
.feature-importance.recommended { color: var(--brand-blue); }
.feature-importance.optional { color: var(--brand-grey); }
.feature-importance.growth { color: #B45309; }

.feature-cell[data-tip] {
  cursor: help;
}

.feature-cell[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  left: 0;
  bottom: calc(100% + 8px);
  z-index: 8;
  min-width: 180px;
  max-width: 240px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #0F172A;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 400;
  line-height: 1.4;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.2);
}

.feature-cell[data-tip]:hover::after,
.feature-cell[data-tip]:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

/* Status icons - glass circle */
.status-yes {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.85), rgba(22, 163, 74, 0.16));
  border: 1px solid rgba(22, 163, 74, 0.28);
  color: #15803d;
  backdrop-filter: blur(6px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.85) inset,
    0 6px 14px rgba(22, 163, 74, 0.16);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

tr:hover .status-yes {
  transform: scale(1.12);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 10px 18px rgba(22, 163, 74, 0.24);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 84px;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.status-badge i {
  font-size: 0.62rem;
  opacity: 0.85;
}

.status-badge.biz-plus {
  background: rgba(148, 163, 184, 0.16);
  color: var(--brand-grey-dark);
  border: 1px solid rgba(148, 163, 184, 0.24);
}

.status-badge.pro-only {
  background: rgba(255, 193, 7, 0.18);
  color: #92400e;
  border: 1px solid rgba(255, 193, 7, 0.35);
}

/* Sticky footer - single compact row */
.compare-modal-foot {
  flex: 0 0 auto;
  padding: 8px 16px;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  background: #fff;
  border-radius: 0 0 28px 28px;
}

.compare-modal-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
}

.compare-modal-cta-copy {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--brand-grey);
  line-height: 1.3;
}

.compare-modal-cta .support-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.compare-modal-cta .btn {
  min-height: 36px;
  min-width: 0;
  padding: 0 14px;
  font-size: 0.82rem;
}

.compare-legend { display: none; }

@media (max-width: 900px) {
  .modal-panel.modal-panel-wide {
    overflow: hidden;
    height: 90vh;
    max-height: 90vh;
    padding: 0;
  }
}

@media (max-width: 760px) {
  .modal { padding: 8px; }

  .modal-panel.modal-panel-wide {
    width: 100%;
    height: 94vh;
    max-height: 94vh;
    border-radius: 22px;
    overflow: hidden;
    padding: 0;
    clip-path: inset(0 round 22px);
    -webkit-clip-path: inset(0 round 22px);
  }

  .compare-modal-head {
    padding: 8px 44px 8px 14px;
    border-radius: 22px 22px 0 0;
  }

  .compare-modal-foot {
    padding: 8px 12px;
    border-radius: 0 0 22px 22px;
  }

  .compare-modal-cta {
    flex-direction: column;
    align-items: stretch;
  }

  .compare-modal-cta .support-cta-actions { width: 100%; }
  .compare-modal-cta .btn { flex: 1; }

  .feature-cell[data-tip]::after {
    display: none;
  }
}

}
