/* ================================================================
   WEBFX CONVERSION RATE CALCULATOR - CLEANED STYLESHEET
   Only includes styles actively used in the template
   ================================================================ */

/* =======================================
   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-cpc-calculator .ic-lightbulb:before {
  content: "\e938";
}

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

.fx-cpc-calculator .ic-refresh-cw:before {
  content: "\e92a";
}

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

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

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

.fx-cpc-calculator .ic-edit:before {
  content: "\e91a";
}

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

.fx-cpc-calculator .ic-bar-chart-2:before {
  content: "\e911";
}

.fx-cpc-calculator .ic-smartphone:before {
  content: "\e92e";
}

.fx-cpc-calculator .ic-thumbs-up:before {
  content: "\e92f";
}

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

.fx-cpc-calculator .ic-user-check:before {
  content: "\e932";
}


/* =======================================
   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-cpc-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-cpc-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-cpc-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-cpc-calculator .container {
  position: relative;
  z-index: 2;
}

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

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

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

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


/* =======================================
   HEADER SECTION
   ======================================= */
.fx-cpc-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-cpc-calculator header h1 {
  color: #FFF;
  text-align: center;
  margin-bottom: 40px;
  position: relative;
  z-index: 1;
}

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

@media (min-width: 1440px) {
  .fx-cpc-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-cpc-calculator header .half-circle-shape {
  max-width: 173px;
  position: absolute;
  top: 0px;
}

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

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

/* Steps Bar */
.fx-cpc-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-cpc-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-cpc-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-cpc-calculator header .steps-by-steps-bar .step-by-step-item:has(.tooltip-marker:hover) {
  z-index: 100;
}

.fx-cpc-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-cpc-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-cpc-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-cpc-calculator header .steps-by-steps-bar .step-by-step-item .step-by-step-item-number .tooltip-marker:hover {
  background: transparent;
  transform: none;
}

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

.fx-cpc-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-cpc-calculator header .container {
  overflow: visible;
  position: relative;
}

.fx-cpc-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-cpc-calculator header .lead .tooltip-marker {
  color: #00316A;
  font-size: 16px;
  width: 20px;
  height: 20px;
}

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

@media (max-width: 991px) {
  .fx-cpc-calculator header .steps-by-steps-bar {
    flex-direction: column;
    gap: 16px;
    position: relative;
    max-width: max-content;
  }
  .fx-cpc-calculator header .steps-by-steps-bar hr {
    height: calc(100% - 28px);
    width: auto;
    left: 13px;
  }
  .fx-cpc-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-cpc-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-cpc-calculator header {
    padding-top: 40px;
    padding-bottom: 140px;
  }
}


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


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

.fx-cpc-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-cpc-calculator .form-group {
  position: relative;
  margin-bottom: var(--s3);              /* 24px */
}

.fx-cpc-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-cpc-calculator .label-with-tooltip {
  display: flex;
  align-items: center;
  gap: var(--s1);                        /* 8px */
}

.fx-cpc-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-cpc-calculator .tooltip-marker:hover {
  background: var(--Primary-Blue);
  transform: scale(1.1);
}

.fx-cpc-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-cpc-calculator .tooltip-marker:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
}

.fx-cpc-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-cpc-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-cpc-calculator .form-control.error {
  border-color: var(--calc-error-color);
}

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

.fx-cpc-calculator .form-group select,
.fx-cpc-calculator .form-group input {
    display: flex;
    padding: var(--s1, 8px) var(--s2, 16px);
    align-items: center;
    gap: var(--s2, 16px);
    /* color: var(--Primary-Light-Gray, #CED4DA); */
    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-cpc-calculator .form-group select::placeholder,
.fx-cpc-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-cpc-calculator .data-input-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

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

/* Form Error Messages */
.fx-cpc-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-cpc-calculator .form-error:before {
  content: "⚠ ";
  margin-right: var(--s1);                /* 8px */
  font-weight: 700;
}

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

.fx-cpc-calculator .form-actions .btn {
  float: left;
  white-space: break-spaces;
  word-break: break-word;
  max-width: 280px;
  margin-left: 5px!important;
  min-height: 72px;
  padding: 10px;
}

.fx-cpc-calculator .btn-block {
  display: block;
  width: 100%;
}

/* Form validation feedback animation */
.fx-cpc-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); }
}

.fx-cpc-calculator .calc-form-container {
  border-radius: var(--s2);              /* 16px */
  border: 1px solid var(--Primary-Blue-Lightest);
  background: linear-gradient(0deg, 
    rgba(204, 228, 255, 0.25) 0%, 
    rgba(204, 228, 255, 0.25) 100%
  ), var(--Primary-White);
  box-shadow: var(--calc-shadow);
  margin-bottom: var(--s4);               /* 32px */
  transition: var(--calc-transition);
}


/* =======================================
   BUTTON STYLING
   ======================================= */
.fx-cpc-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-cpc-calculator .fx-btn .btn-icon {
  font-size: 16px;
}

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

@media (max-width: 768px) {
  .fx-cpc-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-cpc-calculator .fx-btn * {
    font-size: 18px !important;
    line-height: 1.333em !important;
    font-weight: 500 !important;
  }
}


/* =======================================
   RESULTS SECTION
   ======================================= */
.fx-cpc-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-cpc-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-cpc-calculator .results-header h3 {
  color: var(--calc-text-heading);
  margin-bottom: 0;
  flex: 1;
  min-width: 200px;
}

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

.fx-cpc-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 CARDS
   ======================================= */
.fx-cpc-calculator .results-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: var(--s3);
}

/* CTA row: always visible regardless of whether a benchmark was selected */
.fx-cpc-calculator .results-cta-row {
  display: flex;
  justify-content: center;
  margin-bottom: var(--s3);
}

.fx-cpc-calculator .results-cta-row .ai-insights-cta {
  text-decoration: none;
}

.fx-cpc-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-cpc-calculator .stat-card.primary-stat {
  background: #FFFFFF;
  border: 1px solid #CCE4FF;
  overflow: visible;
}

.fx-cpc-calculator .stat-card.benchmark-avg-card {
  background: #F8FAFB;
  border: 1px solid #E5E8EB;
}

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

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

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

/* CPA cross-link inside primary stat card */
.fx-cpc-calculator .cpc-to-cpa-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 10px;
  font-family: var(--font-inter);
  font-size: 13px;
  font-weight: 600;
  color: var(--calc-primary-vivid);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
  line-height: 1;
  position: relative;
  z-index: 10;
}

.fx-cpc-calculator .cpc-to-cpa-link:hover {
  border-bottom-color: var(--calc-primary-vivid);
  color: var(--calc-primary-vivid-dark);
}

.fx-cpc-calculator .cpc-to-cpa-link:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
  z-index: 100;
}


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

.fx-cpc-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-cpc-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-cpc-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-cpc-calculator .dropdown-label i {
  font-size: 20px;
  color: var(--Primary-Blue);
}

.fx-cpc-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-cpc-calculator .dropdown-chevron {
  font-size: 24px;
  color: var(--Primary-Blue);
  transition: transform 0.3s ease;
}

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

.fx-cpc-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-cpc-calculator .history-dropdown-content.open {
  max-height: none;
  opacity: 1;
  overflow: visible;
  background: transparent;
  box-shadow: none;
  border: none;
  border-radius: 0;
}

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

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

.fx-cpc-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-cpc-calculator .history-tags-list-inner .history-tag-item:first-child {
  border-top: 1px solid var(--calc-border-color);
}

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

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

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

.fx-cpc-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-cpc-calculator .history-tag-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

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

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

.fx-cpc-calculator .tag-ctr-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-cpc-calculator .tag-ctr-rate.top-performer {
  background: rgba(65, 212, 140, 0.12);
  color: #1b9e5e;
}

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

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

.fx-cpc-calculator .tag-ctr-rate.below-average {
  background: rgba(248, 116, 118, 0.12);
  color: #c0393b;
}

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

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

.fx-cpc-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;
}

/* History footer actions group */
.fx-cpc-calculator .history-footer-actions {
  display: flex;
  align-items: center;
  gap: var(--s3);
}

/* Compare toggle button */
.fx-cpc-calculator .history-compare-toggle {
  display: flex;
  align-items: center;
  gap: var(--s1);
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  color: var(--calc-primary-vivid);
  font-family: var(--font-inter);
  font-size: 15px;
  font-weight: 600;
  line-height: 150%;
  transition: opacity 0.2s ease;
}

.fx-cpc-calculator .history-compare-toggle:hover { opacity: 0.75; }

.fx-cpc-calculator .history-compare-toggle.active {
  color: var(--calc-error-color);
}

/* Compare bar inside dropdown */
.fx-cpc-calculator .history-compare-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--s2);
  margin: var(--s2) var(--s2) 0 var(--s2);
  border-radius: var(--calc-border-radius);
  background: #fff;
  border: 1px solid rgba(32, 125, 233, 0.15);
  gap: var(--s2);
}

.fx-cpc-calculator .compare-selected-count {
  font-size: 13px;
  font-weight: 500;
  color: var(--calc-text-secondary);
}

.fx-cpc-calculator .history-compare-submit {
  display: flex;
  align-items: center;
  gap: var(--s1);
  padding: 0;
  border: none;
  background: none;
  color: var(--calc-primary-vivid);
  font-family: var(--font-inter);
  font-size: 15px;
  font-weight: 600;
  line-height: 150%;
  cursor: pointer;
  transition: opacity 0.2s ease;
  white-space: nowrap;
}

.fx-cpc-calculator .history-compare-submit:disabled {
  opacity: 0.45;
  cursor: default;
}

.fx-cpc-calculator .history-compare-submit:not(:disabled):hover { opacity: 0.75; }

/* Compare mode tags */
.fx-cpc-calculator .history-tag-item.compare-mode-tag {
  cursor: pointer;
}

.fx-cpc-calculator .compare-check {
  position: relative;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 2px solid var(--calc-border-color);
  background: #fff;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.fx-cpc-calculator .history-tag-item.compare-mode-tag.compare-selected .compare-check {
  background: var(--calc-primary-vivid);
  border-color: var(--calc-primary-vivid);
}

.fx-cpc-calculator .history-tag-item.compare-mode-tag.compare-selected .compare-check::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 2px;
  width: 8px;
  height: 4px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg);
}

/* =======================================
   COMPARISON SECTION (inside dropdown)
   ======================================= */
.fx-cpc-calculator .comparison-section {
  padding: var(--s2) var(--s2) 0;
}

.fx-cpc-calculator .comparison-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--s2);
}

.fx-cpc-calculator .comparison-section-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--calc-text-heading);
  letter-spacing: -0.01em;
}

.fx-cpc-calculator .comparison-close-btn {
  display: flex;
  align-items: center;
  gap: var(--s1);
  padding: 0;
  border: none;
  background: none;
  color: var(--calc-primary-vivid);
  font-family: var(--font-inter);
  font-size: 15px;
  font-weight: 600;
  line-height: 150%;
  cursor: pointer;
  transition: opacity 0.2s ease;
  flex-shrink: 0;
}

.fx-cpc-calculator .comparison-close-btn:hover {
  opacity: 0.75;
}

.fx-cpc-calculator #comparison-chart-svg-wrap {
  max-width: 800px;
  margin: 0 auto 48px;
}

/* Horizontally scrollable compact cards */
.fx-cpc-calculator .comparison-cards-scroll {
  display: flex;
  gap: var(--s2);
}

/* Compact card — equal width, fills container */
.fx-cpc-calculator .comparison-card {
  flex: 1 1 0;
  min-width: 0;
  background: var(--calc-background);
  border: 1px solid var(--calc-border-color);
  border-radius: 10px;
  padding: var(--s2) var(--s2) var(--s2);
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: var(--calc-shadow);
}

.fx-cpc-calculator .comparison-card[data-tier="top-performer"] { border-top: 3px solid #41D48C; }
.fx-cpc-calculator .comparison-card[data-tier="above-average"]  { border-top: 3px solid var(--Primary-Blue); }
.fx-cpc-calculator .comparison-card[data-tier="average"]        { border-top: 3px solid #FFA232; }
.fx-cpc-calculator .comparison-card[data-tier="below-average"]  { border-top: 3px solid #F87476; }

.fx-cpc-calculator .comparison-card-ctr {
  font-size: 26px;
  font-weight: 800;
  color: var(--calc-text-heading);
  line-height: 1;
  letter-spacing: -0.5px;
}

.fx-cpc-calculator .comparison-tier-badge {
  display: inline-flex;
}

.fx-cpc-calculator .comparison-card-context {
  font-size: 13px;
  color: var(--calc-text-muted);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fx-cpc-calculator .comparison-card-stats {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 4px 0;
  border-top: 1px solid var(--calc-border-color);
  margin-top: 2px;
}

.fx-cpc-calculator .comparison-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}

.fx-cpc-calculator .comparison-stat-label { color: var(--calc-text-muted); }
.fx-cpc-calculator .comparison-stat-value { font-weight: 600; color: var(--calc-text-primary); }

.fx-cpc-calculator .comparison-benchmark {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding-top: 2px;
}

.fx-cpc-calculator .comparison-benchmark-avg {
  font-size: 13px;
  color: var(--calc-text-muted);
}

.fx-cpc-calculator .comparison-benchmark-delta {
  font-size: 13px;
  font-weight: 700;
}

.fx-cpc-calculator .comparison-benchmark-delta.positive { color: #1b9e5e; }
.fx-cpc-calculator .comparison-benchmark-delta.negative { color: #c0393b; }

.fx-cpc-calculator .comparison-card-date {
  font-size: 12px;
  color: var(--calc-text-muted);
  margin-top: auto;
  padding-top: 2px;
}

/* Chart card */
.fx-cpc-calculator .comparison-chart-card {
  margin-top: var(--s2);
  background: var(--calc-background);
  border: 1px solid var(--calc-border-color);
  border-radius: 10px;
  padding: var(--s2);
  box-shadow: var(--calc-shadow);
}

.fx-cpc-calculator .comparison-chart-card svg {
  width: 100%;
  height: auto;
  display: block;
}

/* Divider between comparison section and history tags */
.fx-cpc-calculator .comparison-divider {
  border: none;
  border-top: 1px solid var(--calc-border-color);
  margin: var(--s2) 0 0;
}

/* Bar grow animation */
@keyframes chartBarGrow {
  from { transform: scaleY(0); }
  to   { transform: scaleY(1); }
}

.fx-cpc-calculator .chart-bar {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  animation: chartBarGrow 0.45s ease-out var(--bar-delay, 0s) both;
}

/* Chart legend */
.fx-cpc-calculator .comparison-chart-legend {
  padding: 6px 2px 0;
}

.fx-cpc-calculator .chart-legend {
  display: flex;
  gap: var(--s3);
  align-items: center;
  flex-wrap: wrap;
}

.fx-cpc-calculator .chart-legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--calc-text-muted);
}

.fx-cpc-calculator .chart-legend-bar {
  width: 12px;
  height: 10px;
  background: #869298;
  border-radius: 2px;
  opacity: 0.75;
}

.fx-cpc-calculator .chart-legend-benchmark {
  position: relative;
  width: 16px;
  height: 2px;
  background: #FFA232;
  border-radius: 1px;
}

.fx-cpc-calculator .chart-legend-benchmark::before,
.fx-cpc-calculator .chart-legend-benchmark::after {
  content: '';
  position: absolute;
  top: -3px;
  width: 2px;
  height: 8px;
  background: #FFA232;
  border-radius: 1px;
}

.fx-cpc-calculator .chart-legend-benchmark::before { left: 0; }
.fx-cpc-calculator .chart-legend-benchmark::after  { right: 0; }

/* Shared benchmark: dashed line icon */
.fx-cpc-calculator .chart-legend-benchmark-line {
  width: 16px;
  height: 0;
  border-top: 2px dashed #FFA232;
}

/* Export row */
.fx-cpc-calculator .comparison-export-row {
  display: flex;
  gap: var(--s2);
  justify-content: flex-end;
  margin-top: var(--s2);
}

.fx-cpc-calculator .comparison-export-btn {
  display: flex;
  align-items: center;
  gap: var(--s1);
  padding: 0;
  border: none;
  background: none;
  color: var(--calc-primary-vivid);
  font-family: var(--font-inter);
  font-size: 15px;
  font-weight: 600;
  line-height: 150%;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.fx-cpc-calculator .comparison-export-btn:hover {
  opacity: 0.75;
}

.history-toast {
  position: fixed;
  top: var(--s4);
  right: var(--s4);
  box-shadow: 0 4px 16px rgba(32, 125, 233, 0.2);
  z-index: 1000;
  font-size: 14px;
  font-weight: 600;
  color: var(--calc-text-heading);
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  padding: var(--s2);
  border-radius: var(--s1);
  border: 1px solid var(--Primary-Blue-Lightest);
  background: rgba(246, 246, 246, 0.80);
  backdrop-filter: blur(8px);
  max-width: 360px;
  flex-direction: column;
  gap: var(--s2);
}

.history-toast .toast-header {
  color: var(--Primary-Darkest-Gray);
  font-family: var(--font-inter);
  font-size: 21px;
  font-style: normal;
  font-weight: 600;
  line-height: 35px;
}

.history-toast .toast-calculation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s1);
  padding: var(--s1) var(--s2);
  background: var(--White);
  border-radius: var(--s2);
  border: 1px solid transparent;
}

.history-toast .toast-calculation-name {
  font-family: var(--font-inter);
  font-size: 18px;
  font-weight: 600;
  color: var(--Primary-Dark-Gray);
  flex: 1;
  line-height: 28px;
  letter-spacing: -0.081px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history-toast .toast-rate {
  display: inline-flex;
  align-items: center;
  gap: var(--s0-5);
  padding: 4px var(--s1);
  border-radius: 5px;
  background: var(--Primary-Blue-Lightest);
  color: var(--Primary-Blue);
  border: 1px solid var(--Primary-Blue-Light);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.history-toast .toast-rate-value {
  font-size: 14px;
  font-weight: 800;
}

.history-toast .toast-date {
  font-family: var(--font-inter);
  color: var(--Primary-Darkest-Gray);
  font-size: 15px;
  font-style: normal;
  font-weight: 400;
  line-height: 150%;
  letter-spacing: -0.045px;
}

/* =======================================
   BENCHMARK CONTEXT (FORM)
   ======================================= */


.fx-cpc-calculator .benchmark-industry-optional {
  font-size: 12px;
  font-weight: 400;
  color: var(--calc-text-muted);
  margin-left: 4px;
}

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

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

/* Disabled industry group */
.fx-cpc-calculator .benchmark-industry-group select {
  opacity: 1;
  transition: opacity 0.2s ease;
}

.fx-cpc-calculator .benchmark-industry-group.is-disabled select {
  opacity: 0.3;
  cursor: not-allowed;
}


/* =======================================
   BENCHMARK STAT CARD
   ======================================= */
.fx-cpc-calculator .stat-value--benchmark {
  color: #2E3A44;
}

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


/* =======================================
   BENCHMARK PANEL (RESULTS)
   ======================================= */
.fx-cpc-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);
}

/* --- Tier row --- */
.fx-cpc-calculator .benchmark-tier-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.fx-cpc-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-cpc-calculator .tier-badge[data-tier="top-performer"] {
  background: #EBF5E0;
  color: #30B878;
}

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

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

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

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

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

/* --- Gauge --- */
.fx-cpc-calculator .benchmark-gauge-wrap {
  margin-bottom: 32px;
}

.fx-cpc-calculator .gauge-track {
  position: relative;
  height: 10px;
  background: var(--Primary-Blue-Lightest, #CCE4FF);
  border-radius: 10px;
  overflow: visible;
  margin-bottom: 24px;
}

.fx-cpc-calculator .gauge-fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--Primary-Blue-Light, #6BAFF5) 0%, var(--Primary-Blue, #207DE9) 100%);
  border-radius: 10px;
  transition: width 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  max-width: 100%;
}

.fx-cpc-calculator .gauge-marker {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 1;
}

.fx-cpc-calculator .gauge-marker-tick {
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--calc-text-muted);
  border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.fx-cpc-calculator .gauge-marker--low .gauge-marker-tick {
  background: #FFA232;
}

.fx-cpc-calculator .gauge-marker--avg .gauge-marker-tick {
  background: #207DE9;
  width: 12px;
  height: 12px;
}

.fx-cpc-calculator .gauge-marker--high .gauge-marker-tick {
  background: #41D48C;
}

.fx-cpc-calculator .gauge-user-pin {
  position: absolute;
  top: -6px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  pointer-events: none;
  z-index: 2;
  transition: left 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.fx-cpc-calculator .gauge-pin-dot {
  display: block;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--Primary-Blue, #207DE9);
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(32, 125, 233, 0.4);
}

.fx-cpc-calculator .gauge-pin-label {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--Primary-Blue, #207DE9);
  color: #fff;
  font-family: var(--font-inter);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  padding: 3px 6px;
  border-radius: 4px;
  white-space: nowrap;
}

.fx-cpc-calculator .gauge-pin-label::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: var(--Primary-Blue, #207DE9);
}

.fx-cpc-calculator .gauge-labels {
  display: none;
}

/* Legend — always shown, centered, in place of positioned track labels */
.fx-cpc-calculator .gauge-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--s2) var(--s3);
  margin-top: var(--s1-5);
}

.fx-cpc-calculator .gauge-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.fx-cpc-calculator .gauge-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--calc-text-muted);
  flex-shrink: 0;
}

.fx-cpc-calculator .gauge-legend-item--low .gauge-legend-dot {
  background: #FFA232;
}

.fx-cpc-calculator .gauge-legend-item--avg .gauge-legend-dot {
  background: #207DE9;
}

.fx-cpc-calculator .gauge-legend-item--high .gauge-legend-dot {
  background: #41D48C;
}

.fx-cpc-calculator .gauge-legend-text {
  font-family: var(--font-inter);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--calc-text-muted);
  white-space: nowrap;
}

.fx-cpc-calculator .gauge-legend-item--avg .gauge-legend-text {
  font-weight: 700;
  color: var(--calc-text-secondary);
}

/* --- Verdict & source --- */
.fx-cpc-calculator .benchmark-verdict {
  font-family: var(--font-inter);
  font-size: 18px;
  font-weight: 400;
  color: var(--calc-text-secondary);
  line-height: 1.5;
  margin-bottom: var(--s1-5);
}

.fx-cpc-calculator .benchmark-source {
  font-family: var(--font-inter);
  font-size: 12px;
  font-weight: 400;
  color: var(--calc-text-muted);
  line-height: 1.5;
  margin-bottom: 0;
  padding-top: var(--s1);
  text-align: center;
}

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

  .fx-cpc-calculator .benchmark-tier-row {
    gap: var(--s1-5);
  }

  .fx-cpc-calculator .gauge-pin-label {
    font-size: 11px;
  }
}


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

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

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

.fx-cpc-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-cpc-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-cpc-calculator .ai-insight-body {
  min-width: 0;
}

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

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

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

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

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

.fx-cpc-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-cpc-calculator .ai-error-retry:hover {
  color: #B91C1C;
}

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

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

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

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

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


/* =======================================
   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-cpc-calculator {
    padding: var(--s8) 0 var(--s10);           /* 64px 0 80px */
  }

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

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

  /* Stack results header on tablet */
  .fx-cpc-calculator .results-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--s3);                      /* 24px */
  }

  .fx-cpc-calculator .results-header h3 {
    margin-bottom: var(--s1);            /* 8px */
  }

  .fx-cpc-calculator .results-actions {
    justify-content: flex-start;
  }



}

@media (max-width: 768px) {
  .fx-cpc-calculator {
    padding: var(--s6) 0 var(--s10);     /* 48px 0 80px */
  }

  .fx-cpc-calculator::after {
    top: -60px;
    right: -60px;
    width: 200px;
    height: 200px;
  }

  .fx-cpc-calculator .results-header {
    gap: var(--s2);                      /* 16px */
  }

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

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

  .fx-cpc-calculator .quick-history-section {
    margin-bottom: var(--s3);
  }

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

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

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

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

  .fx-cpc-calculator .history-footer {
    flex-direction: column;
    gap: var(--s1-5);
    align-items: stretch;
  }


  .history-toast {
    top: var(--s2);
    right: var(--s2);
    left: var(--s2);
    min-width: auto;
    max-width: none;
  }

  .history-toast .toast-header {
    font-size: 13px;
    line-height: 20px;
  }

  .history-toast .toast-calculation {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    gap: var(--s1);
    padding: var(--s1-5);
  }

  .history-toast .toast-calculation-name {
    font-size: 13px;
    text-align: center;
  }

  .history-toast .toast-rate {
    align-self: center;
    font-size: 11px;
  }

  .history-toast .toast-date {
    font-size: 12px;
  }

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

  /* Comparison cards — 2-column grid on mobile */
  .fx-cpc-calculator .comparison-cards-scroll {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }

  .fx-cpc-calculator .comparison-card {
    flex: none;
  }

  .fx-cpc-calculator .comparison-card-ctr {
    font-size: 22px;
  }

  /* Export row stacks on small screens */
  .fx-cpc-calculator .comparison-export-row {
    justify-content: stretch;
  }

  .fx-cpc-calculator .comparison-export-btn {
    flex: 1;
    justify-content: center;
  }

  /* History footer actions wrap on mobile */
  .fx-cpc-calculator .history-footer-actions {
    justify-content: space-between;
    gap: var(--s2);
  }
}



@media (max-width: 500px) {
  /* Stat cards optimization at 500px and below */
  .fx-cpc-calculator .results-stats-grid {
    grid-template-columns: 1fr;
    gap: var(--s2);
  }

  .fx-cpc-calculator .stat-card {
    padding: var(--s2);
  }

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

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

@media (max-width: 480px) {
  /* Single column at very small widths */
  .fx-cpc-calculator .comparison-cards-scroll {
    grid-template-columns: 1fr;
  }

  .fx-cpc-calculator .comparison-card-ctr {
    font-size: 20px;
  }

  .fx-cpc-calculator .results-header {
    gap: var(--s1);                      /* 8px */
  }

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

  .fx-cpc-calculator .history-count-badge {
    min-width: 20px;
    height: 20px;
    font-size: 11px;
    display: none;
  }

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

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

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

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

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

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

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

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






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

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

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


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

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

  html {
    scroll-behavior: auto !important;
  }

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

}


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


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

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


/* =======================================
   REVERSE CALCULATORS
   ======================================= */
.fx-cpc-calculator .cpc-reverse-calcs {
  margin-top: 24px;
  margin-bottom: 24px;
}

.fx-cpc-calculator .cpc-reverse-calcs-inner {
  border: 1px solid var(--Primary-Blue-Lightest, #CCE4FF);
  background: #fff;
  border-radius: 16px;
  padding: 16px;
}

.fx-cpc-calculator .cpc-reverse-calcs-heading {
  color: var(--Primary-Darkest-Gray);
  font-family: var(--font-inter);
  font-size: 18px;
  font-style: normal;
  font-weight: 600;
  line-height: 35px;
  margin: 0 0 16px;
  display: flex;
  align-items: center;
  gap: var(--s1-5);
  letter-spacing: 0;
}

.fx-cpc-calculator .cpc-reverse-calcs-heading i {
  font-size: 20px;
  color: var(--Primary-Blue);
}

.fx-cpc-calculator .cpc-reverse-calcs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

@media (max-width: 767px) {
  .fx-cpc-calculator .cpc-reverse-calcs-grid {
    grid-template-columns: 1fr;
  }
}

.fx-cpc-calculator .cpc-reverse-card {
  background: linear-gradient(0deg, rgba(204, 228, 255, .25) 0%, rgba(204, 228, 255, .25) 100%), #FFF;;
  border-radius: 8px;
  padding: 24px;
}

.fx-cpc-calculator .cpc-reverse-card-title {
  font-size: 15px;
  font-weight: 700;
  color: #222;
  margin: 0;
  line-height: 22px;
}

.fx-cpc-calculator .cpc-reverse-card-formula {
  font-size: 12px;
  color: #869298;
  margin: 0 0 20px;
  line-height: 20px;
}

.fx-cpc-calculator .cpc-reverse-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

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

.fx-cpc-calculator .cpc-reverse-field input {
  color: var(--calc-text-primary);
  transition: var(--calc-transition);
  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;
  width: 100%;
}

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

.fx-cpc-calculator .cpc-reverse-result {
  font-size: 32px;
  font-weight: 800;
  color: #207DE9;
  line-height: 1;
  margin-bottom: 4px;
}

.fx-cpc-calculator .cpc-reverse-result-label {
  font-size: 12px;
  color: #869298;
  margin: 0;
}


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

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

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