/* Auripath funnel calculator styles - light, flat, more funnel-like */

.ap-funnel-wrap {
  max-width: 1120px;
  margin: 2.5rem auto;
  padding: 1.75rem;
  border-radius: 1.5rem;
  background: #eff6ff;
  color: #0f172a;
  display: grid;
  grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
  gap: 2rem;
  border: 1px solid #dbeafe;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.ap-funnel-panel {
  padding: 1.25rem 1.5rem;
  border-radius: 1rem;
  background: #ffffff;
  border: 1px solid #e5e7eb;
}

.ap-funnel-heading {
  font-size: 1.35rem;
  margin: 0 0 0.75rem;
  color: #0f172a;
}

.ap-funnel-intro {
  font-size: 0.92rem;
  color: #4b5563;
  margin: 0 0 1.25rem;
}

.ap-funnel-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 0.9rem;
  font-size: 0.9rem;
}

.ap-funnel-field label {
  font-weight: 500;
  color: #111827;
}

.ap-funnel-field input {
  background: #ffffff;
  border-radius: 0.6rem;
  border: 1px solid #d1d5db;
  padding: 0.45rem 0.75rem;
  font-size: 0.9rem;
  color: #111827;
}

.ap-funnel-field input:focus {
  outline: none;
  border-color: #2563eb;
}

.ap-funnel-input-prefix {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.ap-funnel-input-prefix input {
  flex: 1;
}

.ap-funnel-currency {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 999px;
  background: #2563eb;
  font-size: 0.8rem;
  color: #f9fafb;
}

.ap-funnel-note {
  font-size: 0.8rem;
  margin-top: 0.5rem;
  color: #6b7280;
}

.ap-funnel-subheading {
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
  color: #0f172a;
}

.ap-funnel-summary {
  margin-bottom: 1.25rem;
}

.ap-funnel-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.ap-funnel-summary-item {
  padding: 0.75rem 0.95rem;
  border-radius: 0.8rem;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.ap-funnel-summary-item-highlight {
  background: #ecfdf3;
  border-color: #16a34a;
}

.ap-funnel-summary-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #6b7280;
}

.ap-funnel-summary-value {
  font-size: 1.05rem;
  font-weight: 600;
  color: #111827;
}

.ap-funnel-summary-pill {
  align-self: flex-start;
  margin-top: 0.1rem;
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
  border: 1px solid #16a34a;
  font-size: 0.7rem;
  color: #166534;
  background: #bbf7d0;
}

.ap-funnel-diagrams {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  margin-top: 0.75rem;
}

.ap-funnel-column-title {
  font-size: 0.9rem;
  margin: 0 0 0.5rem;
  color: #111827;
}

.ap-funnel {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.4rem 0;
  align-items: center;
}

/* Funnel stages: centred, fixed max width, inner fill scales to feel funnelly */
.ap-funnel-stage {
  position: relative;
  width: 260px;
  max-width: 100%;
  height: 40px;
  border-radius: 999px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0.9rem;
  font-size: 0.82rem;
  color: #111827;
  overflow: hidden;
}

.ap-funnel-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: #2563eb;
  transform-origin: center center;
  transform: scaleX(var(--ap-size, 1));
  transition: transform 0.35s ease;
  z-index: 0;
}

/* Audio colour */
.ap-funnel-audio .ap-funnel-stage::before {
  background: #22c55e;
}

.ap-funnel-label,
.ap-funnel-value {
  position: relative;
  z-index: 1;
}

.ap-funnel-label {
  font-weight: 500;
}

.ap-funnel-value {
  font-variant-numeric: tabular-nums;
}

.ap-funnel-column-rev {
  margin-top: 0.4rem;
  font-size: 0.8rem;
  color: #374151;
  text-align: center;
}

.ap-funnel-footnote {
  margin-top: 1rem;
  font-size: 0.78rem;
  color: #6b7280;
}

/* Responsive */
@media (max-width: 960px) {
  .ap-funnel-wrap {
    grid-template-columns: 1fr;
  }
  .ap-funnel-panel {
    padding: 1.1rem 1.2rem;
  }
  .ap-funnel-summary-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .ap-funnel-diagrams {
    grid-template-columns: 1fr;
  }
  .ap-funnel-wrap {
    margin: 1.5rem auto;
    padding: 1.1rem;
  }
}
