/* =========================================================
   IDENTYCA.IO — ROI Calculator Styles
   Matches site dark theme: Inter font, glass-morphism,
   blue-purple gradient accents, reveal animations
   ========================================================= */

/* ── Section wrapper ─────────────────────────────────────── */
.roi-section {
  padding-top: 80px;
}

.roi-container {
  max-width: 860px;
}

/* ── Hero Header ─────────────────────────────────────────── */
.roi-hero {
  text-align: center;
  margin-bottom: 3rem;
}

.roi-hero .section-title {
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  margin-bottom: 1rem;
}

.roi-hero .section-sub {
  max-width: 640px;
  margin: 0 auto 1rem;
}

.roi-hero-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.roi-hero-note i {
  color: var(--accent-blue);
}

/* ── Accordion Cards ─────────────────────────────────────── */
.roi-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  margin-bottom: 1.25rem;
  overflow: hidden;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  backdrop-filter: blur(12px);
}

.roi-card:hover {
  border-color: var(--border-glow);
  box-shadow: var(--shadow-glow);
}

.roi-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 18px 24px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font);
  color: var(--text-primary);
  text-align: left;
  transition: background 0.2s ease;
}

.roi-card-header:hover {
  background: var(--bg-glass-hover);
}

.roi-card-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--gradient-glow);
  border: 1px solid var(--border-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  color: var(--accent-blue);
  flex-shrink: 0;
}

.roi-card-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-primary);
  flex: 1;
}

.roi-chevron {
  color: var(--text-muted);
  font-size: 0.8rem;
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.roi-card-body {
  padding: 0 24px 24px;
}

.roi-card-helper {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  padding: 10px 14px;
  background: rgba(79, 195, 247, 0.06);
  border-left: 3px solid var(--accent-blue);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  line-height: 1.6;
}

/* ── 2-column grid ───────────────────────────────────────── */
.roi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem 2rem;
}

.roi-full {
  grid-column: 1 / -1;
}

/* ── Field ──────────────────────────────────────────────── */
.roi-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.roi-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 1.4;
}

.roi-optional {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 0.75rem;
}

.roi-helper {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ── Inputs ─────────────────────────────────────────────── */
.roi-input,
.roi-select {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 0.9rem;
  padding: 9px 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  width: 100%;
  outline: none;
}

.roi-input:focus,
.roi-select:focus {
  border-color: rgba(79, 195, 247, 0.5);
  box-shadow: 0 0 0 3px rgba(79, 195, 247, 0.1);
}

.roi-input::placeholder {
  color: var(--text-muted);
}

.roi-select option {
  background: #080d1a;
  color: var(--text-primary);
}

/* Dollar prefix inputs */
.roi-input-prefix {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.roi-input-prefix:focus-within {
  border-color: rgba(79, 195, 247, 0.5);
  box-shadow: 0 0 0 3px rgba(79, 195, 247, 0.1);
}

.roi-input-prefix span {
  padding: 9px 10px 9px 14px;
  color: var(--accent-blue);
  font-weight: 600;
  font-size: 0.9rem;
  flex-shrink: 0;
  background: rgba(79, 195, 247, 0.06);
  border-right: 1px solid var(--border-subtle);
}

.roi-input-prefix .roi-input {
  border: none;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
}

.roi-input-prefix .roi-input:focus {
  border: none;
  box-shadow: none;
}

/* ── Sliders ─────────────────────────────────────────────── */
.roi-slider-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.roi-slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 5px;
  border-radius: 50px;
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-purple));
  outline: none;
  cursor: pointer;
}

.roi-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(79, 195, 247, 0.3), 0 2px 6px rgba(0,0,0,0.4);
  cursor: pointer;
  transition: box-shadow 0.2s ease;
}

.roi-slider::-webkit-slider-thumb:hover {
  box-shadow: 0 0 0 5px rgba(79, 195, 247, 0.4), 0 2px 6px rgba(0,0,0,0.4);
}

.roi-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  border: none;
  cursor: pointer;
  box-shadow: 0 0 0 3px rgba(79, 195, 247, 0.3);
}

.roi-slider-val {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-blue);
  min-width: 40px;
  text-align: right;
}

/* ── Toggle Switch ──────────────────────────────────────── */
.roi-toggle-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 4px;
}

.roi-toggle {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
  flex-shrink: 0;
}

.roi-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.roi-toggle-track {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border-subtle);
  border-radius: 50px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.roi-toggle input:checked + .roi-toggle-track {
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
  border-color: transparent;
}

.roi-toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.4);
  transition: transform 0.3s ease;
}

.roi-toggle input:checked + .roi-toggle-track .roi-toggle-thumb {
  transform: translateX(22px);
}

.roi-toggle-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* ── Info notes ──────────────────────────────────────────── */
.roi-info-note {
  background: rgba(79, 195, 247, 0.07);
  border: 1px solid rgba(79, 195, 247, 0.2);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.6;
}

.roi-info-note i {
  color: var(--accent-blue);
  flex-shrink: 0;
  margin-top: 2px;
}

/* ── Percentage warning ──────────────────────────────────── */
.roi-pct-warning {
  background: rgba(251, 191, 36, 0.08);
  border: 1px solid rgba(251, 191, 36, 0.3);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.82rem;
  color: var(--accent-amber);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.roi-fix-btn {
  background: rgba(251, 191, 36, 0.15);
  border: 1px solid rgba(251, 191, 36, 0.4);
  border-radius: 50px;
  color: var(--accent-amber);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 3px 12px;
  cursor: pointer;
  font-family: var(--font);
  transition: var(--transition);
}

.roi-fix-btn:hover {
  background: rgba(251, 191, 36, 0.25);
}

/* ── Tech total summary ──────────────────────────────────── */
.roi-tech-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--gradient-glow);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.roi-tech-total strong {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--accent-blue);
}

/* ── Tooltip ─────────────────────────────────────────────── */
.roi-tooltip {
  position: relative;
  display: inline-flex;
  cursor: help;
}

.roi-tooltip i {
  font-size: 0.72rem;
  color: var(--text-muted);
  transition: color 0.2s;
}

.roi-tooltip:hover i {
  color: var(--accent-blue);
}

.roi-tooltip::after {
  content: attr(data-tip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  background: rgba(5, 8, 16, 0.97);
  border: 1px solid var(--border-glow);
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 1.5;
  white-space: nowrap;
  max-width: 240px;
  white-space: normal;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  width: max-content;
}

.roi-tooltip:hover::after {
  opacity: 1;
}

/* ── Live Preview Teaser ─────────────────────────────────── */
@keyframes teaserPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(79, 195, 247, 0), var(--shadow-card); }
  50%       { box-shadow: 0 0 0 3px rgba(79, 195, 247, 0.15), var(--shadow-card); }
}

.roi-teaser {
  background: var(--bg-card);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-xl);
  margin: 2.5rem 0 2rem;
  overflow: hidden;
  animation: teaserPulse 3s ease-in-out infinite;
  backdrop-filter: blur(16px);
}

.roi-teaser-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  background: var(--gradient-glow);
  border-bottom: 1px solid var(--border-glow);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-blue);
}

.roi-teaser-header i {
  font-size: 0.9rem;
}

.roi-teaser-note {
  margin-left: auto;
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text-muted);
}

.roi-teaser-body {
  padding: 20px 24px;
}

.roi-teaser-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.roi-teaser-tier {
  margin-bottom: 14px;
}

.roi-teaser-label {
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.roi-teaser-divider {
  height: 1px;
  background: var(--border-subtle);
  margin: 16px 0;
}

/* Tier badge */
.roi-tier-badge {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 50px;
  border: 1px solid;
  letter-spacing: 0.03em;
  transition: all 0.3s ease;
}

/* NDI */
.roi-ndi-label {
  font-size: 0.82rem;
  font-weight: 700;
}

.roi-ndi-gauge {
  position: relative;
  height: 10px;
  background: rgba(255,255,255,0.06);
  border-radius: 50px;
  overflow: visible;
  margin-bottom: 4px;
}

.roi-ndi-bar {
  height: 100%;
  border-radius: 50px;
  background: #34d399;
  transition: width 0.6s cubic-bezier(0.4,0,0.2,1), background 0.6s ease;
}

.roi-ndi-markers {
  display: flex;
  justify-content: space-between;
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Search time */
.roi-search-time {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.roi-search-without,
.roi-search-with {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 1;
  text-align: center;
}

.roi-search-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 50px;
  letter-spacing: 0.04em;
}

.roi-search-badge.without {
  background: rgba(248, 113, 113, 0.12);
  color: #f87171;
  border: 1px solid rgba(248, 113, 113, 0.25);
}

.roi-search-badge.with {
  background: rgba(52, 211, 153, 0.12);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.25);
}

.roi-search-val {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-primary);
}

.roi-search-arrow {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Probability rings */
.roi-prob-rings {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.roi-ring-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 120px;
  max-width: 160px;
}

.roi-ring {
  width: 80px;
  height: 80px;
  transform: rotate(-90deg);
}

.roi-ring-bg {
  fill: none;
  stroke: rgba(255,255,255,0.07);
  stroke-width: 6;
}

.roi-ring-fill {
  fill: none;
  stroke-width: 6;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.6s cubic-bezier(0.4,0,0.2,1);
}

.without-ring {
  stroke: url(#withoutGradient);
  stroke: #f87171;
}

.with-ring {
  stroke: url(#withGradient);
  stroke: #34d399;
}

.roi-ring-label {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.roi-ring-pct {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
}

.roi-ring-sub {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.roi-ring-qual {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent-blue);
}

.roi-ring-arrow {
  font-size: 1rem;
  color: var(--text-muted);
}

/* Baseline ROI */
.roi-baseline-roi {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 20px 0 6px;
  text-align: center;
}

.roi-baseline-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.roi-baseline-val {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.03em;
}

/* ── CTA Button ──────────────────────────────────────────── */
.roi-cta-wrap {
  display: flex;
  justify-content: center;
  margin: 2rem 0;
}

.roi-generate-btn {
  background: var(--gradient-main);
  color: #050810;
  font-size: 1.05rem;
  font-weight: 700;
  padding: 16px 40px;
  border-radius: 50px;
  box-shadow: 0 4px 30px rgba(79, 195, 247, 0.35);
  transition: var(--transition);
  cursor: pointer;
  border: none;
  font-family: var(--font);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.roi-generate-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 40px rgba(79, 195, 247, 0.5);
  filter: brightness(1.07);
}

/* ── Modal specific ──────────────────────────────────────── */
.roi-modal-backdrop {
  z-index: 1100;
}

.roi-modal-box {
  max-height: 90vh;
  overflow-y: auto;
}

.roi-consent-wrap {
  margin-top: 4px;
}

.roi-consent-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.roi-consent-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 2px;
  accent-color: var(--accent-blue);
  cursor: pointer;
}

.roi-modal-footnote {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 12px;
  line-height: 1.6;
}

/* ── Confirmation card ───────────────────────────────────── */
.roi-confirm {
  text-align: center;
  padding: 2.5rem;
  background: var(--bg-card);
  border: 1px solid rgba(52, 211, 153, 0.3);
  border-radius: var(--radius-xl);
  margin: 2rem 0;
}

.roi-confirm-animate {
  animation: tabIn 0.5s ease forwards;
}

.roi-confirm-icon {
  font-size: 3rem;
  color: var(--accent-green);
  margin-bottom: 1rem;
  animation: confirmPop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes confirmPop {
  0%   { transform: scale(0); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.roi-confirm h3 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
}

.roi-confirm p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  line-height: 1.7;
}

.roi-confirm-cta {
  margin-top: 1rem;
}

.roi-confirm-link {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--accent-blue);
  font-weight: 700;
  font-size: 0.9rem;
  font-family: var(--font);
  text-decoration: underline;
  transition: color 0.2s;
}

.roi-confirm-link:hover {
  color: var(--accent-cyan);
}

/* Analytics group wrapper — transparent to grid layout */
.roi-analytics-group {
  display: contents;
}

/* ── Mobile sticky teaser ───────────────────────────────── */
@media (max-width: 768px) {
  .roi-grid {
    grid-template-columns: 1fr;
  }

  .roi-full {
    grid-column: 1;
  }

  .roi-teaser-note {
    display: none;
  }

  .roi-prob-rings {
    gap: 12px;
  }

  .roi-ring-wrap {
    min-width: 100px;
  }

  .roi-card-header {
    padding: 14px 16px;
  }

  .roi-card-body {
    padding: 0 16px 20px;
  }

  .roi-generate-btn {
    width: 100%;
    justify-content: center;
    font-size: 0.95rem;
    padding: 14px 24px;
  }

  .roi-hero .section-title {
    font-size: clamp(1.7rem, 6vw, 2.4rem);
  }

  .roi-search-time {
    gap: 8px;
  }

  .roi-baseline-val {
    font-size: 2.5rem;
  }
}
