/* =============================================================================
   Timetics ROI Calculator — Stylesheet v1.0.0
   Scoped under .timetics-roi-calculator to avoid conflicts with the theme.
   ============================================================================= */

/* ── Custom Properties ──────────────────────────────────────────────────────── */
.timetics-roi-calculator {
 
  /* Brand */
  --trc-timetics:      #6366f1;
  --trc-timetics-light:#eef2ff;
  --trc-calendly:      #006BFF;
  --trc-calcom:        #111827;

  /* Neutrals */
  --trc-bg:            #ffffff;
  --trc-surface:       #f8fafc;
  --trc-border:        #e2e8f0;
  --trc-text:          #1e293b;
  --trc-text-muted:    #64748b;
  --trc-text-light:    #94a3b8;

  /* Accents */
  --trc-green:         #10b981;
  --trc-green-light:   #d1fae5;
  --trc-red:           #ef4444;

  /* Sizing */
  --trc-radius:        12px;
  --trc-radius-sm:     8px;
  --trc-shadow:        0 1px 3px rgba(0,0,0,.08), 0 4px 16px rgba(0,0,0,.06);
  --trc-shadow-hover:  0 4px 6px rgba(0,0,0,.07), 0 10px 30px rgba(0,0,0,.1);

  /* Transitions */
  --trc-ease:          cubic-bezier(.4,0,.2,1);
  --trc-duration:      200ms;
 
  color: var(--trc-text);
  background: var(--trc-bg);  
  max-width: 900px;
  margin: 0 auto; 
  box-sizing: border-box;
}

.timetics-roi-calculator *,
.timetics-roi-calculator *::before,
.timetics-roi-calculator *::after {
  box-sizing: inherit;
}

/* ── Pricing Header ─────────────────────────────────────────────────────────── */
.trc-header {
  margin-bottom: 28px;
}

.trc-header-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--trc-text-muted);
  margin-bottom: 16px;
}

.trc-pricing-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

/* ── Individual Pricing Card ──────────────────────────────────────────────── */
.trc-card {
  position: relative;
  background: var(--trc-surface);
  border: 1px solid var(--trc-border);
  border-radius: var(--trc-radius);
  padding: 20px 22px 22px;
  text-align: left;
  transition: box-shadow var(--trc-duration) var(--trc-ease),
              transform var(--trc-duration) var(--trc-ease);
}

.trc-card:hover {
  box-shadow: var(--trc-shadow-hover);
  transform: translateY(-2px);
}

/* ── Our Product card ─────────────────────────────────────────────────────── */
.trc-card--our-product {
  background: linear-gradient(135deg, var(--trc-timetics-light) 0%, #fff 100%);
  border-color: var(--trc-timetics);
  border-width: 2px;
}

.trc-card--our-product .trc-card__price {
  color: var(--trc-timetics);
}

.trc-card__badge {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 99px;
  margin-bottom: 10px;
}

.trc-card__badge--free {
  background: var(--trc-green-light);
  color: #065f46;
}

.trc-card__logo {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.trc-card__brand {
  font-size: 14px;
  font-weight: 600;
  color: var(--trc-text);
}

.trc-card__price {
  font-size: 32px;
  font-weight: 800;
  line-height: 1;
  color: var(--trc-text);
  letter-spacing: -.02em;
  margin-bottom: 4px;

  /* Smooth numeric transitions */
  transition: color var(--trc-duration) var(--trc-ease);
}


.trc-card__price--competitor {
  color: var(--trc-red);
}

.trc-card__period {
  font-size: 12px;
  color: var(--trc-text-muted);
  font-weight: 500;
}

/* ── Savings Banner ─────────────────────────────────────────────────────────── */
.trc-savings-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--trc-green-light);
  border: 1px solid #6ee7b7;
  border-radius: var(--trc-radius-sm);
  padding: 12px 18px;
  font-size: 14px;
  color: #065f46;
  font-weight: 500;
  margin-bottom: 28px;
  animation: trc-slide-in var(--trc-duration) var(--trc-ease) both;
}

.trc-savings-banner[hidden] {
  display: none !important;
}

.trc-savings-banner strong {
  font-size: 16px;
  font-weight: 800;
}

.trc-savings-icon {
  flex-shrink: 0;
}

@keyframes trc-slide-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Team Size Slider ───────────────────────────────────────────────────────── */
.trc-slider-section {
  background: var(--trc-surface);
  border: 1px solid var(--trc-border);
  border-radius: var(--trc-radius);
  padding: 24px 28px;
  margin-bottom: 24px;
}

.trc-slider-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 8px;
}

.trc-slider-label {
  font-size: 17px;
  font-weight: 600;
  color: var(--trc-text);
  cursor: default;
}

.trc-user-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--trc-timetics);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 99px;
}

.trc-user-badge span:first-child {
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
}

/* Slider track wrapper (positions the coloured progress fill) */
.trc-slider-track-wrap {
  position: relative;
  height: 20px;
  display: flex;
  align-items: center;
}

/* The actual range input */
.trc-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 10px;
  background: var(--trc-border);
  border-radius: 99px;
  outline: none;
  cursor: pointer;
  position: relative;
  z-index: 1;
}

/* Progress fill — absolutely positioned, updated by JS */
.trc-slider-progress {
  position: absolute;
  left: 0;
  width: 0;
  height: 6px;
  background: var(--trc-timetics);
  border-radius: 99px;
  pointer-events: none;
  transition: width var(--trc-duration) var(--trc-ease);
}

/* Webkit thumb */
.trc-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  background: var(--trc-timetics);
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--trc-timetics), 0 2px 6px rgba(99,102,241,.4);
  cursor: pointer;
  transition: box-shadow var(--trc-duration) var(--trc-ease),
              transform var(--trc-duration) var(--trc-ease);
}

.trc-slider::-webkit-slider-thumb:hover,
.trc-slider:focus::-webkit-slider-thumb {
  box-shadow: 0 0 0 4px rgba(99,102,241,.2), 0 2px 6px rgba(99,102,241,.4);
  transform: scale(1.1);
}

/* Firefox thumb */
.trc-slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  background: var(--trc-timetics);
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--trc-timetics);
  cursor: pointer;
  transition: box-shadow var(--trc-duration) var(--trc-ease);
}

.trc-slider::-moz-range-thumb:hover {
  box-shadow: 0 0 0 4px rgba(99,102,241,.2);
}

/* Firefox track fill */
.trc-slider::-moz-range-progress {
  background: var(--trc-timetics);
  height: 6px;
  border-radius: 99px;
}

/* Focus ring */
.trc-slider:focus {
  outline: none;
}
.trc-slider:focus-visible::-webkit-slider-thumb {
  box-shadow: 0 0 0 4px rgba(99,102,241,.35);
}

/* Tick labels */
.trc-slider-ticks {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 11px;
  color: var(--trc-text-light);
  font-weight: 500;
  padding: 0 4px;
}

/* ── Feature Toggles Section ────────────────────────────────────────────────── */
.trc-features-section {
  background: var(--trc-surface);
  border: 1px solid var(--trc-border);
  border-radius: var(--trc-radius);
  padding: 24px 28px;
}

.trc-features-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 8px;
}

.trc-features-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--trc-text);
  margin: 0;
}

.trc-features-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.trc-link-btn {
  background: none;
  border: none;
  padding: 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--trc-timetics);
  cursor: pointer; 
  transition: color var(--trc-duration);
}

.trc-link-btn:hover {
  color: #4f46e5;
  text-decoration: underline;
}

.trc-link-btn:focus-visible {
  outline: 2px solid var(--trc-timetics);
  outline-offset: 2px;
  border-radius: 2px;
}

.trc-divider {
  color: var(--trc-text-light);
  font-size: 13px;
}

/* ── Feature Grid ───────────────────────────────────────────────────────────── */
.trc-features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
}

.trc-loading {
  color: var(--trc-text-muted);
  font-size: 14px;
}

/* ── Skeleton placeholder cards (shown before JS renders real cards) ── */
.trc-card--skeleton {
  background: linear-gradient(90deg, var(--trc-surface) 25%, #edf0f5 50%, var(--trc-surface) 75%);
  background-size: 200% 100%;
  animation: trc-skeleton-shimmer 1.4s ease-in-out infinite;
  min-height: 110px;
  border-color: var(--trc-border);
}

@keyframes trc-skeleton-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Individual Feature Row ─────────────────────────────────────────────────── */
.trc-feature-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #fff;
  border: 1px solid var(--trc-border);
  border-radius: var(--trc-radius-sm);
  padding: 12px 14px;
  cursor: pointer;
  transition: background var(--trc-duration) var(--trc-ease),
              border-color var(--trc-duration) var(--trc-ease),
              box-shadow var(--trc-duration) var(--trc-ease);
  user-select: none;
}

.trc-feature-row:hover {
  background: #fafaff;
  border-color: #c7d2fe;
  box-shadow: 0 1px 4px rgba(99,102,241,.08);
}

.trc-feature-row.trc-feature-row--active {
  background: var(--trc-timetics-light);
  border-color: #a5b4fc;
}

.trc-feature-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--trc-text);
  flex: 1;
  line-height: 1.4;
}

/* ── Toggle Switch ──────────────────────────────────────────────────────────── */
.trc-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.trc-toggle input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.trc-toggle-track {
  display: block;
  width: 40px;
  height: 22px;
  background: #cbd5e1;
  border-radius: 99px;
  cursor: pointer;
  transition: background var(--trc-duration) var(--trc-ease);
  position: relative;
}

.trc-toggle-track::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
  transition: transform var(--trc-duration) var(--trc-ease),
              box-shadow var(--trc-duration) var(--trc-ease);
}

.trc-toggle input:checked + .trc-toggle-track {
  background: var(--trc-timetics);
}

.trc-toggle input:checked + .trc-toggle-track::after {
  transform: translateX(18px);
  box-shadow: 0 1px 4px rgba(99,102,241,.4);
}

.trc-toggle input:focus-visible + .trc-toggle-track {
  outline: 2px solid var(--trc-timetics);
  outline-offset: 2px;
}

/* ── Responsive ─────────────────────────────────────────────────────────────── */
@media (max-width: 680px) {
  .timetics-roi-calculator {
    padding: 24px 20px 28px;
  }

  .trc-pricing-cards {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .trc-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    padding: 16px 18px;
  }

  .trc-card__badge {
    width: 100%;
    margin-bottom: 0;
  }

  .trc-card__price {
    font-size: 26px;
  }

  .trc-features-grid {
    grid-template-columns: 1fr;
  }

  .trc-slider-section,
  .trc-features-section {
    padding: 18px 20px;
  }
}

@media (max-width: 420px) {
  .trc-slider-header,
  .trc-features-header {
    flex-direction: column;
    align-items: flex-start;
  }
}
