/* ================================================================
   WEBFX CUSTOMER LIFETIME VALUE (CLV) CALCULATOR
   ================================================================ */

/* =======================================
   ICON FONT DEFINITION
   ======================================= */
@font-face {
  font-family: "icomoon";
  src: url("/wp-content/themes/fx/assets/icons/fx-calculator/icomoon.eot?byfh96");
  src: url("/wp-content/themes/fx/assets/icons/fx-calculator/icomoon.eot?byfh96#iefix")
      format("embedded-opentype"),
    url("/wp-content/themes/fx/assets/icons/fx-calculator/icomoon.ttf")
      format("truetype"),
    url("/wp-content/themes/fx/assets/icons/fx-calculator/icomoon.woff?byfh96") format("woff"),
    url("/wp-content/themes/fx/assets/icons/fx-calculator/icomoon.svg?byfh96#icomoon")
      format("svg");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

[class^="ic-"],
[class*=" ic-"] {
  font-family: "icomoon";
  speak: never;
  font-style: normal;
  font-weight: normal;
  font-variant: normal;
  text-transform: none;
  line-height: 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  vertical-align: middle;
}

/* Icon definitions - only icons used in template */
.fx-clv-calculator .ic-thumbs-up:before {
  content: "\e92f";
}

.fx-clv-calculator .ic-thumbs-down:before {
  content: "\e907";
}

.fx-clv-calculator .ic-arrow-right:before {
  content: "\e90e";
}

.fx-clv-calculator .ic-clock:before {
  content: "\e918";
}

.fx-clv-calculator .ic-chevron-down:before {
  content: "\e914";
}

.fx-clv-calculator .ic-bar-chart:before {
  content: "\e910";
}

.fx-clv-calculator .ic-trending-up:before {
  content: "\e930";
}


/* =======================================
   CUSTOM PROPERTIES (CSS VARIABLES)
   ======================================= */
:root {
  /* Official WebFX Brand Colors */
  --calc-primary-color: var(--Core-Blue-blue-04);        /* #4C74B9 */
  --calc-primary-hover: var(--Core-Blue-blue-05);        /* #305493 */
  --calc-primary-active: var(--Core-Blue-blue-06);       /* #263A5F */
  --calc-primary-vivid: var(--Primary-Blue);             /* #207DE9 */
  --calc-primary-vivid-dark: var(--Primary-Blue-Dark);   /* #0C57AD */
  --calc-success-color: var(--Secondary-Green-Light);    /* #41D48C */
  --calc-warning-color: var(--Tertiary-Orange-Light);    /* #FFA232 */
  --calc-error-color: var(--Tertiary-Red-Light);         /* #F87476 */
  --calc-background: var(--Primary-White);               /* #FFF */
  --calc-background-light: var(--Core-Blue-blue-00);     /* #F9FBFF */

  /* Official WebFX Text Colors */
  --calc-text-primary: var(--Gray-gray-07);              /* #182128 */
  --calc-text-secondary: var(--Gray-gray-06);            /* #21272C */
  --calc-text-muted: var(--Gray-gray-04);                /* #869298 */
  --calc-text-heading: var(--Gray-gray-08);              /* #0B1720 */

  /* Official WebFX Layout Variables */
  --calc-border-color: var(--Core-Blue-blue-01);         /* #D2DCEE */
  --calc-border-radius: var(--border-radius);            /* 4px */
  --calc-shadow: 0px 2px 8px rgba(110, 123, 129, 0.2);
  --calc-transition: all 0.3s ease;
}


/* =======================================
   MAIN CALCULATOR WRAPPER
   ======================================= */
.fx-clv-calculator {
  position: relative;
  font-family: "Inter", sans-serif;
  overflow: hidden;
  color: var(--Primary-White);
  padding: var(--s10) 0 var(--s15);            /* 80px 0 120px */
}

/* Clean texture overlay for three-color gradient */
.fx-clv-calculator::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(ellipse at 50% 15%, rgba(255,255,255,0.1) 0%, transparent 60%),
    linear-gradient(180deg, rgba(255,255,255,0.05) 0%, transparent 30%);
  pointer-events: none;
  z-index: 1;
}

/* Simple geometric accent for clean gradient */
.fx-clv-calculator::after {
  content: '';
  position: absolute;
  top: -100px;
  right: -100px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
}

/* Ensure content appears above overlays */
.fx-clv-calculator .container {
  position: relative;
  z-index: 2;
}

.fx-clv-calculator p {
  margin-top: 0;
  font-family: "Inter", sans-serif;
}

.fx-clv-calculator h1,
.fx-clv-calculator .h1 {
  color: var(--Primary-White);
  position: relative;
  z-index: 3;
}

.fx-clv-calculator p.lead {
  position: relative;
  z-index: 3;
}

.fx-clv-calculator .lead {
  font-weight: 600;
  font-size: 22px;
  line-height: 32px;
  letter-spacing: -0.018em;
}


/* =======================================
   HEADER SECTION
   ======================================= */
.fx-clv-calculator header {
  display: flex;
  padding: 80px 0px 160px 0px;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  border-radius: 24px;
  background: var(--Vivid-Blue-vivid-09, #00316A);
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.fx-clv-calculator header h1 {
  color: #FFF;
  text-align: center;
  margin-bottom: 40px;
  position: relative;
  z-index: 1;
}

.fx-clv-calculator header p {
  width: 100%;
  color: white;
  position: relative;
  z-index: 1;
}

@media (min-width: 1440px) {
  .fx-clv-calculator header h1 {
    font-family: var(--font-inter);
    font-size: 64px;
    font-style: normal;
    font-weight: 800;
    line-height: 130%;
    letter-spacing: -2.304px;
  }
}

/* Half Circle Shape */
.fx-clv-calculator header .half-circle-shape {
  max-width: 173px;
  position: absolute;
  top: 0px;
}

/* Small BG Dots */
.fx-clv-calculator header .small-bg-dots {
  position: absolute;
  max-width: 101px;
  right: 0px;
  top: 0px;
}

/* Big BG Dots */
.fx-clv-calculator header .big-bg-dots {
  max-width: 163px;
  bottom: 24px;
  position: absolute;
  left: 114px;
}

/* Steps Bar */
.fx-clv-calculator header .steps-by-steps-bar {
  display: flex;
  max-width: 800px;
  margin: 0 auto;
  justify-content: space-between;
  position: relative;
  overflow: visible;
  z-index: 10;
}

.fx-clv-calculator header .steps-by-steps-bar hr {
  position: absolute;
  width: 100%;
  top: 12px;
  margin: 0px;
  max-width: calc(80%);
  left: 10%;
  border: 2px solid var(--Tertiary-Teal-Light, #6ADFD7);
}

.fx-clv-calculator header .steps-by-steps-bar .step-by-step-item {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: var(--s2);
  max-width: 20%;
  width: 100%;
  position: relative;
  z-index: 2;
  word-wrap: normal;
  text-wrap: nowrap;
}

.fx-clv-calculator header .steps-by-steps-bar .step-by-step-item:has(.tooltip-marker:hover) {
  z-index: 100;
}

.fx-clv-calculator header .steps-by-steps-bar .step-by-step-item .step-by-step-item-number {
  border-radius: 50%;
  background: var(--Tertiary-Teal-Light, #6ADFD7);
  width: 28px;
  height: 28px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--Primary-Blue-Darkest, #083A74);
  text-align: center;
  font-family: var(--font-inter);
  font-size: 13px;
  font-style: normal;
  font-weight: 600;
  line-height: 18px;
  position: relative;
  overflow: visible;
}

.fx-clv-calculator header .steps-by-steps-bar .step-by-step-item .step-by-step-item-number .tooltip-marker {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-width: 28px;
  min-height: 28px;
  background: transparent;
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  cursor: help;
  position: relative;
}

.fx-clv-calculator header .steps-by-steps-bar .step-by-step-item .step-by-step-item-number .tooltip-marker::before {
  content: '';
  position: absolute;
  inset: calc(var(--s1) * -1);
  border-radius: 50%;
}

.fx-clv-calculator header .steps-by-steps-bar .step-by-step-item .step-by-step-item-number .tooltip-marker:hover {
  background: transparent;
  transform: none;
}

.fx-clv-calculator header .steps-by-steps-bar .step-by-step-item .step-by-step-item-number .tooltip-marker .tooltip-label {
  position: static;
}

.fx-clv-calculator header .steps-by-steps-bar .step-by-step-item .step-by-step-item-number .tooltip-text {
  position: absolute;
  z-index: 101;
  bottom: calc(100% + var(--s1));
  top: auto;
  left: 50%;
  transform: translateX(-50%);
  margin-left: 0;
  white-space: normal;
  text-wrap: wrap;
}

.fx-clv-calculator header .container {
  overflow: visible;
  position: relative;
}

.fx-clv-calculator header .steps-by-steps-bar .step-by-step-item .step-by-step-item-content {
  color: var(--White, #FFF);
  text-align: center;
  font-family: var(--font-inter);
  font-size: 18px;
  font-style: normal;
  font-weight: 600;
  line-height: 28px;
  letter-spacing: -0.081px;
}

.fx-clv-calculator header .lead .tooltip-marker {
  color: #00316A;
  font-size: 16px;
  width: 20px;
  height: 20px;
}

.fx-clv-calculator header .lead .tooltip-marker .tooltip-label {
  position: relative;
  top: -5px;
}

@media (max-width: 991px) {
  .fx-clv-calculator header .steps-by-steps-bar {
    flex-direction: column;
    gap: 16px;
    position: relative;
    max-width: max-content;
  }
  .fx-clv-calculator header .steps-by-steps-bar hr {
    height: calc(100% - 28px);
    width: auto;
    left: 13px;
  }
  .fx-clv-calculator header .steps-by-steps-bar .step-by-step-item {
    flex-direction: row;
    max-width: 100%;
    text-align: left;
    align-items: flex-start;
    justify-content: flex-start;
  }
  .fx-clv-calculator header .steps-by-steps-bar .step-by-step-item .step-by-step-item-content {
    text-align: left;
    white-space: wrap;
  }
}

@media (max-width: 768px) {
  .fx-clv-calculator header {
    padding-top: 40px;
    padding-bottom: 140px;
  }
}


/* =======================================
   CONTENT WRAPPER
   ======================================= */
.fx-clv-calculator .fx-clv-calculator-content {
  margin-top: -92px;
}


/* =======================================
   FORM STYLING
   ======================================= */
.fx-clv-calculator .form-control:focus,
.fx-clv-calculator button:focus {
  outline: 0;
  -webkit-box-shadow: none;
  -moz-box-shadow: none;
  box-shadow: none;
}

.fx-clv-calculator .modern-calc-form {
  position: relative;
  border-radius: var(--s2, 16px);
  border: 1px solid var(--Primary-Blue-Lightest, #CCE4FF);
  background: linear-gradient(0deg, rgba(204, 228, 255, 0.25) 0%, rgba(204, 228, 255, 0.25) 100%), #FFF;
  padding: var(--s4) !important;
}

.fx-clv-calculator .form-group {
  position: relative;
  margin-bottom: var(--s3);              /* 24px */
}

.fx-clv-calculator .form-label {
  display: flex;
  align-items: center;
  font-weight: 600;
  font-size: 15px;
  color: var(--Primary-Darkest-Gray);
  margin-bottom: var(--s1);              /* 8px */
  line-height: 28px;
  letter-spacing: -0.067px;
}

/* WebFX Tooltip System */
.fx-clv-calculator .label-with-tooltip {
  display: flex;
  align-items: center;
  gap: var(--s1);                        /* 8px */
}

.fx-clv-calculator .tooltip-marker {
  display: inline-block;
  text-align: center;
  border-radius: 50%;
  font-weight: 600;
  cursor: help;
  position: relative;
  background: var(--Primary-Blue-Light);
  color: var(--Primary-White);
  width: 24px;
  height: 24px;
  font-size: 18px;
  line-height: 24px;
  transition: var(--calc-transition);
}

.fx-clv-calculator .tooltip-marker:hover {
  background: var(--Primary-Blue);
  transform: scale(1.1);
}

.fx-clv-calculator .tooltip-text {
  visibility: hidden;
  width: 280px;
  max-width: 280px;
  background-color: var(--Primary-Darker-Gray);
  color: var(--Primary-White);
  text-align: left;
  border-radius: var(--s1);              /* 8px */
  padding: var(--s1) var(--s1-5);        /* 8px 12px */
  position: absolute;
  z-index: 10;
  bottom: 125%;
  left: 50%;
  margin-left: -140px;
  opacity: 0;
  transition: opacity 0.3s;
  font-weight: 400;
  font-size: 14px;
  line-height: 1.4;
  pointer-events: none;
  text-transform: none;
  letter-spacing: normal;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  white-space: normal;
  text-wrap: wrap;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.fx-clv-calculator .tooltip-marker:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
}

/* Smaller tooltip marker for inline label use */
.fx-clv-calculator .form-label .tooltip-marker {
  width: 16px;
  height: 16px;
  font-size: 11px;
  line-height: 16px;
  margin-left: 4px;
  flex-shrink: 0;
}

.fx-clv-calculator .form-label .tooltip-text {
  width: 220px;
  margin-left: -110px;
  font-size: 13px;
}

.fx-clv-calculator .form-control {
  width: 100%;
  height: 56px;
  padding: var(--s2) var(--s2);          /* 16px */
  border: 2px solid var(--calc-border-color);
  border-radius: var(--calc-border-radius);
  font-size: 16px;
  font-weight: 500;
  color: var(--calc-text-primary);
  background: var(--calc-background);
  transition: var(--calc-transition);
  font-family: var(--font-inter);
}

.fx-clv-calculator .form-control:focus {
  outline: none;
  border-color: var(--calc-primary-vivid);
  box-shadow: 0 0 0 3px rgba(32, 125, 233, 0.1);
}

.fx-clv-calculator .form-control.error {
  border-color: var(--calc-error-color);
}

.fx-clv-calculator .form-control.error:focus {
  box-shadow: 0 0 0 3px rgba(248, 115, 118, 0.1);
}

.fx-clv-calculator .form-group select,
.fx-clv-calculator .form-group input {
    display: flex;
    padding: var(--s1, 8px) var(--s2, 16px);
    align-items: center;
    gap: var(--s2, 16px);
    font-family: var(--font-inter);
    font-size: 15px;
    font-style: normal;
    font-weight: 600;
    line-height: 36px;
    min-height: auto;
    height: auto;
    border-radius: var(--s1, 8px);
    background: var(--White, #FFF);
    border: none;
}

.fx-clv-calculator .form-group select::placeholder,
.fx-clv-calculator .form-group input::placeholder {
  color: var(--Primary-Light-Gray, #CED4DA);
  font-family: var(--font-inter);
  font-size: 15px;
  font-style: normal;
  font-weight: 600;
  line-height: 35px;
}

.fx-clv-calculator .data-input-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

@media (max-width: 768px) {
  .fx-clv-calculator .data-input-grid {
    grid-template-columns: 1fr;
    gap: var(--s2);                      /* 16px on mobile */
  }
}

/* =======================================
   BUSINESS MODEL TOGGLE
   ======================================= */
.fx-clv-calculator .model-toggle {
  display: inline-flex;
  padding: 4px;
  background: #F0F4F9;
  border-radius: 10px;
  margin-bottom: var(--s3);
  gap: 4px;
}

.fx-clv-calculator .model-toggle-btn {
  border: none;
  background: transparent;
  color: var(--calc-text-secondary);
  font-family: var(--font-inter);
  font-size: 14px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 7px;
  cursor: pointer;
  transition: var(--calc-transition);
}

.fx-clv-calculator .model-toggle-btn:hover {
  color: var(--calc-text-heading);
}

.fx-clv-calculator .model-toggle-btn.is-active {
  background: #FFFFFF;
  color: var(--calc-primary-vivid);
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}

@media (max-width: 500px) {
  .fx-clv-calculator .model-toggle {
    display: flex;
  }

  .fx-clv-calculator .model-toggle-btn {
    flex: 1;
    text-align: center;
    padding: 8px 10px;
    font-size: 13px;
  }
}

/* Form Error Messages */
.fx-clv-calculator .form-error {
  display: none;
  margin-top: var(--s1);                  /* 8px */
  background: var(--Tertiary-Red-Lightest);
  border-radius: var(--calc-border-radius);
  border-left: 3px solid var(--calc-error-color);
  padding: 4px 8px;
  color: var(--Tertiary-Red, #F04D50);
  font-family: var(--font-inter);
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
  line-height: 155%;
  letter-spacing: 0.24px;
  border: none;
}

.fx-clv-calculator .form-error:before {
  content: "⚠ ";
  margin-right: var(--s1);                /* 8px */
  font-weight: 700;
}

/* Form Actions */
.fx-clv-calculator .form-actions {
  display: flex;
  justify-content: center;
}

/* Form validation feedback animation */
.fx-clv-calculator .calc-form-container.shake-error {
  animation: shake 0.6s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-4px); }
  20%, 40%, 60%, 80% { transform: translateX(4px); }
}


/* =======================================
   BUTTON STYLING
   ======================================= */
.fx-clv-calculator .fx-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s1);                        /* 8px for icon spacing */
  margin-top: var(--s2);                 /* 16px top margin */
  height: 48px;
  margin-left: 0px;
}

.fx-clv-calculator .fx-btn .btn-icon {
  font-size: 16px;
}

.fx-clv-calculator .fx-btn .btn-icon i {
  font-size: 16px;
}

@media (max-width: 768px) {
  .fx-clv-calculator .fx-btn {
    font-size: 18px !important;
    line-height: 1.333em !important;
    font-weight: 500 !important;
    padding: var(--s2) var(--s2-5) !important;
    text-align: left;
    height: auto;
  }
  .fx-clv-calculator .fx-btn * {
    font-size: 18px !important;
    line-height: 1.333em !important;
    font-weight: 500 !important;
  }
}


/* =======================================
   RESULTS SECTION
   ======================================= */
.fx-clv-calculator .calc-results-section {
  padding: 0px;
  animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Results Section Header with Action Buttons */
.fx-clv-calculator .results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--s5);              /* 40px */
  flex-wrap: wrap;
  gap: var(--s2);                        /* 16px gap */
}

.fx-clv-calculator .results-header h3 {
  color: var(--calc-text-heading);
  margin-bottom: 0;
  flex: 1;
  min-width: 200px;
  outline: none;
}

/* Results Action Buttons */
.fx-clv-calculator .results-actions {
  display: flex;
  gap: var(--s2);                        /* 16px gap */
  align-items: center;
  flex-shrink: 0;
}

.fx-clv-calculator .results-actions .fx-btn {
  margin: 0;
  white-space: nowrap;
  display: flex;
  height: 51px;
  padding: var(--s1, 8px) var(--s2, 16px);
  align-items: center;
  gap: 8px;
  border-radius: var(--spacing-1, 8px);
  background: var(--White, #FFF) !important;
  border: none !important;
  color: var(--Primary-Darkest-Gray, #222) !important;
  font-family: var(--font-inter);
  font-size: 21px !important;
  font-style: normal;
  font-weight: 600 !important;
  line-height: 35px !important;
}

/* =======================================
   STAT CARD
   ======================================= */
.fx-clv-calculator .results-stats-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-bottom: var(--s3);
}

.fx-clv-calculator .stat-card {
  display: flex;
  align-items: stretch;
  border-radius: 16px;
  padding: 26px 28px;
  width: 100%;
  transition: var(--calc-transition);
  position: relative;
  overflow: hidden;
}

.fx-clv-calculator .stat-card.primary-stat {
  background: #FFFFFF;
  border: 1px solid #CCE4FF;
  overflow: visible;
}

.fx-clv-calculator .stat-card-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.fx-clv-calculator .stat-value {
  color: #207DE9;
  font-family: Inter;
  font-size: 46px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.03em;
  text-align: left;
}

.fx-clv-calculator .stat-label {
  color: #182128;
  font-family: Inter;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  margin-top: 10px;
}

.fx-clv-calculator .stat-sublabel {
  font-family: var(--font-inter);
  font-size: 13px;
  font-weight: 400;
  color: #6B7680;
  line-height: 1.4;
  margin-top: 3px;
}


/* =======================================
   METRICS ROW (LTV:CAC ratio, profit margin)
   ======================================= */
.fx-clv-calculator .clv-metrics-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: var(--s3);
}

.fx-clv-calculator .metric-chip {
  background: #FFF;
  border: 1px solid #CCE4FF;
  border-radius: 16px;
  padding: 16px 18px;
}

.fx-clv-calculator .metric-chip-label {
  font-family: var(--font-inter);
  font-size: 12px;
  font-weight: 700;
  color: var(--calc-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.fx-clv-calculator .metric-chip-value {
  font-family: var(--font-inter);
  font-size: 26px;
  font-weight: 800;
  color: var(--calc-text-heading);
  margin-top: 6px;
  line-height: 1.2;
}

.fx-clv-calculator .metric-chip-sub {
  font-family: var(--font-inter);
  font-size: 12.5px;
  color: var(--calc-text-muted);
  margin-top: 14px;
  line-height: 1.5;
}

.fx-clv-calculator .metric-chip-bar {
  position: relative;
  height: 6px;
  background: #E5E8EB;
  border-radius: 3px;
  margin-top: 14px;
}

.fx-clv-calculator .metric-chip-bar-fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0%;
  border-radius: 3px;
  background: var(--calc-text-muted);
  transition: width 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.3s ease;
  max-width: 100%;
}

.fx-clv-calculator .metric-chip-bar-marker {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--calc-text-heading);
  border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  pointer-events: none;
}

.fx-clv-calculator .metric-chip-bar-labels {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-inter);
  font-size: 11px;
  color: var(--calc-text-muted);
  margin-top: 6px;
}

.fx-clv-calculator .metric-chip-bar-legend {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.fx-clv-calculator .metric-chip-bar-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--calc-text-heading);
  flex-shrink: 0;
}

@media (max-width: 500px) {
  .fx-clv-calculator .clv-metrics-row {
    grid-template-columns: 1fr;
  }
}


/* =======================================
   BENCHMARK PANEL (RESULTS)
   ======================================= */
.fx-clv-calculator .benchmark-panel {
  margin-top: var(--s3);
  padding: var(--s3);
  background: var(--Primary-White);
  border-radius: var(--s2);
  border: 1px solid var(--Primary-Blue-Lightest, #CCE4FF);
}

@media (max-width: 768px) {
  .fx-clv-calculator .benchmark-panel {
    padding: var(--s2);
  }
}


/* =======================================
   RESULT INSIGHT (tailored, tier-based)
   ======================================= */
.fx-clv-calculator .clv-result-insight {
  margin-bottom: var(--s3);
}

.fx-clv-calculator .clv-result-insight h4 {
  font-family: var(--font-inter);
  font-size: 18px;
  line-height: 1.5;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--calc-text-heading);
}

.fx-clv-calculator .clv-result-insight p {
  font-family: var(--font-inter);
  font-size: 18px;
  line-height: 1.5;
  color: var(--calc-text-secondary);
  margin: 0;
}

.fx-clv-calculator .clv-result-insight[data-tier="loss"] {
  border-left-color: var(--calc-error-color);
}

.fx-clv-calculator .clv-result-insight[data-tier="thin"] {
  border-left-color: var(--calc-warning-color);
}

.fx-clv-calculator .clv-result-insight[data-tier="healthy"] {
  border-left-color: var(--calc-primary-vivid);
}

.fx-clv-calculator .clv-result-insight[data-tier="strong"] {
  border-left-color: var(--calc-success-color);
}


/* =======================================
   TIER BADGE (matches CTR/CPC benchmark tier badge)
   ======================================= */
.fx-clv-calculator .clv-tier-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.fx-clv-calculator .tier-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 999px;
  font-family: var(--font-inter);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.fx-clv-calculator .tier-badge .tier-icon {
  font-size: 14px;
}

.fx-clv-calculator .tier-badge[data-tier="strong"] {
  background: #EBF5E0;
  color: #30B878;
}

.fx-clv-calculator .tier-badge[data-tier="healthy"] {
  background: #E6F1FF;
  color: #1665B0;
}

.fx-clv-calculator .tier-badge[data-tier="thin"] {
  background: #FFF6D5;
  color: #8A6D15;
}

.fx-clv-calculator .tier-badge[data-tier="loss"] {
  background: #FCDBDC;
  color: #992E30;
}

.fx-clv-calculator .tier-delta {
  font-family: var(--font-inter);
  font-size: 14px;
  font-weight: 600;
  color: #2E3A44;
  line-height: 1.4;
}


/* =======================================
   AI INSIGHTS — RESULTS
   ======================================= */
.fx-clv-calculator .ai-insights-wrap {
  margin-bottom: var(--s1);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.fx-clv-calculator .ai-insights-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  width: 100%;
}

.fx-clv-calculator .ai-insights-trigger:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.fx-clv-calculator .ai-insights-block {
  width: 100%;
  align-self: stretch;
  display: flex;
  gap: 12px;
  padding: 16px 18px;
  border-radius: 12px;
  background: linear-gradient(120deg, #F4F9FF, #EEFAF9);
  border: 1px solid #CCE4FF;
}

.fx-clv-calculator .ai-insight-icon {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #207DE9;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fx-clv-calculator .ai-insight-body {
  min-width: 0;
}

.fx-clv-calculator .ai-insight-label {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #1665B0;
  margin-bottom: 4px;
}

.fx-clv-calculator .ai-insights-content {
  font-size: 18px;
  line-height: 1.5;
  color: #2E3A44;
}

.fx-clv-calculator .ai-insights-cta {
  text-decoration: none;
}

.fx-clv-calculator .ai-loading {
  color: #6B7280;
  font-size: 13px;
  font-style: italic;
}

.fx-clv-calculator .ai-error {
  color: #DC2626;
  font-size: 13px;
}

.fx-clv-calculator .ai-error-retry {
  background: none;
  border: none;
  padding: 0;
  margin-left: 2px;
  color: #DC2626;
  font-size: 13px;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}

.fx-clv-calculator .ai-error-retry:hover {
  color: #B91C1C;
}

@media (max-width: 768px) {
  .fx-clv-calculator .ai-insights-block {
    flex-direction: column;
    gap: 8px;
    padding: 12px 14px;
  }

  .fx-clv-calculator .ai-insight-icon {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    border-radius: 5px;
  }

  .fx-clv-calculator .ai-insight-icon svg {
    width: 10px;
    height: 10px;
  }

  .fx-clv-calculator .ai-insight-label {
    margin-bottom: 2px;
    line-height: 18px;
  }

  .fx-clv-calculator .ai-insights-content {
    font-size: 15px;
  }
}


/* =======================================
   SCENARIO EXPLORER
   ======================================= */
.fx-clv-calculator .scenario-explorer {
  margin-top: var(--s3);
  padding: var(--s3);
  background: var(--Primary-White);
  border-radius: var(--s2);
  border: 1px solid var(--Primary-Blue-Lightest, #CCE4FF);
}

.fx-clv-calculator .scenario-explorer-header h4 {
  font-family: var(--font-inter);
  font-size: 18px;
  font-weight: 700;
  color: var(--calc-text-heading);
  margin-bottom: 4px;
}

.fx-clv-calculator .scenario-explorer-header p {
  font-family: var(--font-inter);
  font-size: 14px;
  color: var(--calc-text-secondary);
  margin-bottom: var(--s3);
}

.fx-clv-calculator .scenario-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: var(--s2);
}

.fx-clv-calculator .scenario-slider-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.fx-clv-calculator .scenario-slider-label label {
  font-family: var(--font-inter);
  font-size: 13px;
  color: var(--calc-text-secondary);
  font-weight: 500;
}

.fx-clv-calculator .scenario-slider-value {
  font-family: var(--font-inter);
  font-size: 14px;
  font-weight: 700;
  color: var(--calc-text-heading);
}

.fx-clv-calculator .scenario-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: #E5E8EB;
  outline: none;
  margin: 0;
}

.fx-clv-calculator .scenario-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--calc-primary-vivid);
  cursor: pointer;
  border: 3px solid #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.fx-clv-calculator .scenario-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--calc-primary-vivid);
  cursor: pointer;
  border: 3px solid #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.fx-clv-calculator .scenario-slider::-moz-range-track {
  height: 6px;
  border-radius: 3px;
  background: #E5E8EB;
}

.fx-clv-calculator .scenario-fixed-note {
  font-family: var(--font-inter);
  font-size: 12px;
  color: var(--calc-text-muted);
  margin-bottom: var(--s2);
}

.fx-clv-calculator .scenario-result {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: var(--s2);
}

.fx-clv-calculator .scenario-result-label {
  font-family: var(--font-inter);
  font-size: 14px;
  color: var(--calc-text-secondary);
}

.fx-clv-calculator .scenario-result-value {
  font-family: var(--font-inter);
  font-size: 32px;
  font-weight: 800;
  color: var(--calc-primary-vivid);
  line-height: 1;
}

.fx-clv-calculator .scenario-chart-wrap {
  margin-bottom: var(--s1);
}

.fx-clv-calculator .scenario-chart-wrap svg text {
  font-family: var(--font-inter);
}

.fx-clv-calculator .scenario-chart-note {
  font-family: var(--font-inter);
  font-size: 12px;
  color: var(--calc-text-muted);
  margin: 0 0 var(--s3);
}

.fx-clv-calculator .scenario-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
}

.fx-clv-calculator .scenario-actions .fx-btn {
  margin: 0;
}

.fx-clv-calculator .scenario-delta {
  font-family: var(--font-inter);
  font-size: 14px;
  color: var(--calc-text-secondary);
  margin: 0;
}

.fx-clv-calculator .scenario-delta a {
  color: var(--calc-primary-vivid);
  font-weight: 600;
  text-decoration: none;
}

.fx-clv-calculator .scenario-delta a:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  .fx-clv-calculator .scenario-explorer {
    padding: var(--s2);
  }

  .fx-clv-calculator .scenario-controls {
    grid-template-columns: 1fr;
    gap: var(--s2);
  }

  .fx-clv-calculator .scenario-actions {
    flex-direction: column;
    align-items: flex-start;
  }
}


/* =======================================
   CALCULATION HISTORY - CUSTOM DROPDOWN
   ======================================= */
.fx-clv-calculator .quick-history-section {
  margin-top: var(--s3);
}

.fx-clv-calculator .history-dropdown-wrapper {
  width: 100%;
  position: relative;
  border-radius: var(--s2);
  background: rgba(204, 228, 255, 0.30);
  border: 1px solid var(--Primary-Blue-Lightest, #CCE4FF);
}

.fx-clv-calculator .history-dropdown-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.3s ease;
  color: var(--Primary-Darkest-Gray);
  background: transparent;
  border: none;
  box-shadow: none;
  border-radius: 0;
  padding: var(--s2);
}

.fx-clv-calculator .dropdown-label {
  display: flex;
  align-items: center;
  gap: var(--s1-5);
  color: var(--Primary-Darkest-Gray);
  font-family: var(--font-inter);
  font-size: 18px;
  font-style: normal;
  font-weight: 600;
  line-height: 35px;
}

.fx-clv-calculator .dropdown-label i {
  font-size: 20px;
  color: var(--Primary-Blue);
}

.fx-clv-calculator .history-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 22px;
  padding: 0 var(--s1);
  background: var(--Primary-Blue);
  color: var(--Primary-White);
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
}

.fx-clv-calculator .dropdown-chevron {
  font-size: 24px;
  color: var(--Primary-Blue);
  transition: transform 0.3s ease;
}

.fx-clv-calculator .history-dropdown-trigger[aria-expanded="true"] .dropdown-chevron {
  transform: rotate(180deg);
}

.fx-clv-calculator .history-dropdown-content {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  background: var(--Primary-White);
  border: 2px solid var(--Primary-Blue-Lightest);
  border-top: none;
  border-radius: 0 0 var(--s2) var(--s2);
  margin-top: -2px;
  transition: all 0.3s ease;
}

.fx-clv-calculator .history-dropdown-content.open {
  max-height: none;
  opacity: 1;
  overflow: visible;
  background: transparent;
  box-shadow: none;
  border: none;
  border-radius: 0;
}

.fx-clv-calculator .history-tags-list {
  background: transparent;
  padding: 0;
}

.fx-clv-calculator .history-tags-list-inner {
  display: flex;
  flex-direction: column;
}

.fx-clv-calculator .history-tag-item {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  width: 100%;
  max-width: none;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease;
  padding: 14px var(--s2);
  border-radius: 0;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--calc-border-color);
}

.fx-clv-calculator .history-tags-list-inner .history-tag-item:first-child {
  border-top: 1px solid var(--calc-border-color);
}

.fx-clv-calculator .history-tag-item:hover,
.fx-clv-calculator .history-tag-item.selected {
  background: var(--calc-background-light);
}

.fx-clv-calculator .history-tag-item:hover .history-tag-label,
.fx-clv-calculator .history-tag-item.selected .history-tag-label {
  color: var(--Primary-Blue);
}

.fx-clv-calculator .history-tag-main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.fx-clv-calculator .history-tag-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: rgb(46, 58, 68) !important;
  font-family: var(--font-inter);
  font-size: 14.5px;
  font-weight: 600;
}

.fx-clv-calculator .history-tag-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.fx-clv-calculator .history-tag-time {
  font-size: 12.5px;
  color: var(--calc-text-muted);
  white-space: nowrap;
}

.fx-clv-calculator .history-tag-reload {
  font-size: 13px;
  font-weight: 600;
  color: var(--calc-primary-vivid);
  white-space: nowrap;
}

.fx-clv-calculator .tag-clv-rate {
  display: inline-flex;
  align-items: center;
  gap: var(--s0-5);
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--Primary-Blue-Lightest);
  color: var(--Primary-Blue);
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

.fx-clv-calculator .tag-clv-rate.strong {
  background: rgba(65, 212, 140, 0.12);
  color: #1b9e5e;
}

.fx-clv-calculator .tag-clv-rate.healthy {
  background: rgba(32, 125, 233, 0.12);
  color: var(--Primary-Blue, #207DE9);
}

.fx-clv-calculator .tag-clv-rate.thin {
  background: rgba(255, 162, 50, 0.12);
  color: #b36a00;
}

.fx-clv-calculator .tag-clv-rate.loss {
  background: rgba(248, 116, 118, 0.12);
  color: #c0393b;
}

.fx-clv-calculator .rate-value {
  font-size: 13px;
  font-weight: 700;
}

.fx-clv-calculator .history-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: var(--s2);
}

.fx-clv-calculator .history-clear-button {
  display: flex;
  align-items: center;
  gap: var(--s1);
  cursor: pointer;
  transition: all 0.3s ease;
  color: var(--Primary-Darkest-Gray);
  font-family: var(--font-inter);
  font-size: 15px;
  font-style: normal;
  font-weight: 600;
  line-height: 150%;
  letter-spacing: -0.045px;
  padding: 0;
  border: none;
  background: none;
}

@media (max-width: 768px) {
  .fx-clv-calculator .quick-history-section {
    margin-bottom: var(--s3);
  }

  .fx-clv-calculator .history-dropdown-trigger {
    padding: var(--s1-5) var(--s2);
  }

  .fx-clv-calculator .dropdown-label {
    font-size: 16px;
  }

  .fx-clv-calculator .history-tag-item {
    padding: 12px var(--s1-5);
    gap: 10px;
  }

  .fx-clv-calculator .history-tag-time {
    display: none;
  }
}

@media (max-width: 480px) {
  .fx-clv-calculator .history-count-badge {
    min-width: 20px;
    height: 20px;
    font-size: 11px;
    display: none;
  }

  .fx-clv-calculator .history-tag-label {
    font-size: 13px;
  }

  .fx-clv-calculator .tag-clv-rate {
    font-size: 11px;
  }

  .fx-clv-calculator .dropdown-label i {
    display: none;
  }

  .fx-clv-calculator .dropdown-label .dropdown-label-text {
    line-height: 20px;
    text-align: left;
  }
}


/* =======================================
   ACCESSIBILITY
   ======================================= */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}


/* =======================================
   RESPONSIVE DESIGN
   ======================================= */

@media (max-width: 991px) {
  .fx-clv-calculator {
    padding: var(--s8) 0 var(--s10);           /* 64px 0 80px */
  }

  .fx-clv-calculator::after {
    top: -80px;
    right: -80px;
    width: 250px;
    height: 250px;
  }

  .fx-clv-calculator .lead {
    font-size: 20px;
    line-height: 28px;
    margin-bottom: 18px;
  }
}

@media (max-width: 768px) {
  .fx-clv-calculator .results-header {
    flex-direction: column;
    align-items: stretch;
  }

  .fx-clv-calculator .results-actions .fx-btn {
    width: 100%;
    justify-content: center;
  }

  .fx-clv-calculator .tooltip-text {
    width: 250px;
    margin-left: -125px;
    font-size: 13px;
  }

  .fx-clv-calculator .modern-calc-form {
    padding: var(--s3) !important;                  /* 24px */
  }
}


@media (max-width: 500px) {
  .fx-clv-calculator .stat-card {
    padding: var(--s2);
  }

  .fx-clv-calculator .stat-value {
    font-size: 36px;
  }

  .fx-clv-calculator .stat-label {
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .fx-clv-calculator .results-header {
    gap: var(--s1);                      /* 8px */
  }

  .fx-clv-calculator .results-actions .fx-btn {
    font-size: 14px;
    padding: var(--s1) var(--s2);        /* More compact */
  }

  .fx-clv-calculator .stat-card {
    padding: var(--s1-5);                /* 12px */
    gap: var(--s1-5);                    /* 12px */
    flex-direction: column;
    text-align: center;
  }

  .fx-clv-calculator .stat-value {
    font-size: 28px;
    line-height: 36px;
    width: 100%;
    text-align: left;
  }

  .fx-clv-calculator .stat-label {
    font-size: 14px;
    line-height: 18px;
    width: 100%;
    text-align: left;
    margin-bottom: 10px;
    margin-top: 0;
  }

  .fx-clv-calculator .tooltip-text {
    width: 200px;
    margin-left: -100px;
    font-size: 12px;
  }

  .fx-clv-calculator {
    padding: var(--s5) 0 var(--s8);      /* 40px 0 64px */
  }

  .fx-clv-calculator::after {
    top: -40px;
    right: -40px;
    width: 120px;
    height: 120px;
    opacity: 0.7;
  }

  .fx-clv-calculator .results-actions {
    flex-direction: column;
    width: 100%;
    gap: var(--s1);                      /* 8px */
  }
}


/* =======================================
   ACCESSIBILITY - MOTION PREFERENCES
   ======================================= */
@media (prefers-reduced-motion: reduce) {
  .fx-clv-calculator *,
  .fx-clv-calculator *::before,
  .fx-clv-calculator *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .fx-clv-calculator .calc-form-container.shake-error {
    animation: none !important;
  }

  html {
    scroll-behavior: auto !important;
  }

  .fx-clv-calculator::before,
  .fx-clv-calculator::after {
    display: none;
  }
}


/* =======================================
   ACCESSIBILITY - HIGH CONTRAST MODE
   ======================================= */
@media (prefers-contrast: high) {
  .fx-clv-calculator .form-control {
    border-width: 2px;
  }

  .fx-clv-calculator {
    background: #083A74 !important;
  }

  .fx-clv-calculator::before,
  .fx-clv-calculator::after {
    display: none;
  }
}


/* =======================================
   PRINT STYLES
   ======================================= */
@media print {
  .fx-clv-calculator .calc-form-container {
    box-shadow: none;
    border: 1px solid #ccc;
  }

  .fx-clv-calculator {
    background: #083A74 !important;
    color: var(--Primary-White) !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .fx-clv-calculator::before,
  .fx-clv-calculator::after {
    display: none;
  }
}
