/* ================================================================
   WEBFX ROAS CALCULATOR STYLESHEET
   ================================================================ */

/* =======================================
   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 */
.fx-roas-calculator .ic-arrow-right:before {
  content: "\e90e";
}

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


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

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

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

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

.fx-roas-calculator .lead {
  font-weight: 400;
  font-size: 21px;
  line-height: 35px;
}


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

.fx-roas-calculator header p {
  width: 100%;
  color: white;
}

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

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

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

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

.fx-roas-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-roas-calculator header .steps-by-steps-bar .step-by-step-item {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: var(--s4);
  max-width: 20%;
  width: 100%;
  z-index: 2;
  word-wrap: normal;
  text-wrap: nowrap;
}

.fx-roas-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: normal;
}

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

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


/* =======================================
   TOOLTIP STYLES
   ======================================= */
.fx-roas-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-roas-calculator .tooltip-text {
  visibility: hidden;
  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);
}

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

.fx-roas-calculator .tooltip-label {
  display: inline-block;
  width: 24px;
  height: 24px;
  line-height: 24px;
  text-align: center;
  background: #84B9F5;
  color: var(--Primary-Blue-Darkest, #083A74);
  border-radius: 50%;
  font-weight: 700;
  font-size: 14px;
  vertical-align: middle;
  line-height: 14px;
}


/* =======================================
   CONTENT SECTION
   ======================================= */
.fx-roas-calculator-content {
  position: relative;
  margin-top: -92px;
  z-index: 10;
}


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

.fx-roas-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-roas-calculator .CALC-form {
  width: 100%;
}

.fx-roas-calculator .calc-form-steps {
  display: block;
}

.fx-roas-calculator .form-group {
  position: relative;
  width: 100%;
  margin-bottom: 0px;
}

.fx-roas-calculator .form-group.result-wrapper {
  display: flex;
  width: 416px;
  padding: var(--s3, 24px);
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: var(--s1, 8px);
  align-self: stretch;
  border-radius: var(--s1, 8px);
  border: 1px solid var(--Primary-Blue-Lightest, #CCE4FF);
  background: var(--White, #FFF);
  margin: 0px;
}

.fx-roas-calculator .form-group.result-wrapper .result-wrapper-item {
  display: flex;
  width: 100%;
  flex-direction: column;
}

.fx-roas-calculator .form-group.result-wrapper .result-wrapper-item label {
  color: var(--Primary-Darkest-Gray, #222);
  font-family: var(--font-inter);
  font-size: 21px;
  font-style: normal;
  font-weight: 600;
  line-height: 35px;
  margin-bottom: var(--s1);
}

.fx-roas-calculator .form-group.result-wrapper .roas-result-wrapper .text-result {
  color: var(--Primary-Blue, #207DE9);
  font-family: var(--font-inter);
  font-size: 40px;
  font-style: normal;
  font-weight: 800;
  line-height: 48px;
  letter-spacing: -1.44px;
}

 .fx-roas-calculator .form-group.result-wrapper .break-even-result-wrapper .text-result {
   color: var(--Secondary-Green-Light, #41D48C);
   font-family: var(--font-inter);
   font-size: 40px;
   font-style: normal;
   font-weight: 800;
   line-height: 48px; /* 120% */
   letter-spacing: -1.44px;
  }

  .fx-roas-calculator .form-group.result-wrapper .break-even-result-wrapper .text-result.negative {
   color: var(--Tertiary-Red, #F04D50);
  }

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

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

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

.fx-roas-calculator .form-control:disabled {
  background-color: #f5f5f5;
  color: #999;
  cursor: not-allowed;
  opacity: 0.6;
}

.fx-roas-calculator .form-group select,
.fx-roas-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-roas-calculator .form-group select::placeholder,
.fx-roas-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-roas-calculator .form-group input:disabled {
  background-color: #f5f5f5;
  color: #999;
  cursor: not-allowed;
  opacity: 0.6;
}

/* Form Group Wrapper - Two Column Layout */
.fx-roas-calculator .form-group-wrapper {
  display: flex;
  gap: var(--s3);                        /* 24px gap between columns */
  margin-bottom: var(--s5);              /* 24px bottom margin */
}

.fx-roas-calculator .form-group-wrapper-left {
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  flex: 1 1 auto;
  gap: 12px;
}

.fx-roas-calculator .form-group-wrapper-right {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

@media (max-width: 768px) {
  .fx-roas-calculator .form-group-wrapper {
    flex-direction: column;
    gap: var(--s2);                      /* 16px gap on mobile */
  }
  
  .fx-roas-calculator .form-group-wrapper-right {
    width: 100%;
  }
}

.fx-roas-calculator .accordion-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: var(--calc-transition);
  padding-bottom: 16px;
  background: transparent;
  color: var(--Primary-Darkest-Gray, #222);
  font-family: var(--font-inter);
  font-size: 15px;
  font-style: normal;
  font-weight: 600;
  line-height: 28px;
  letter-spacing: -0.067px;
  border-radius: 0px;

  text-align: left;
  border-top: 0px;
  border-right: 0px;
  border-left: 0px;
  border-bottom: 1px solid var(--Primary-Blue-Lightest, #CCE4FF);
  padding-left: 0px;
  padding-right: 0px;
}

.fx-roas-calculator .accordion-header:hover {
  color: var(--Primary-Blue, #207DE9);
}

.fx-roas-calculator .accordion-header.active {
  color: var(--Primary-Blue, #207DE9);
}

.fx-roas-calculator .accordion-title {
  flex: 1;
}

.fx-roas-calculator .accordion-chevron {
  font-size: 24px;
  color: var(--Primary-Blue, #207DE9);
  transition: transform 0.3s ease;
  flex-shrink: 0;
  margin-left: var(--s2);                /* 16px */
}

.fx-roas-calculator .accordion-chevron.rotated {
  transform: rotate(-180deg);
}

.fx-roas-calculator .accordion-content {
  transition: max-height 0.3s ease, opacity 0.3s ease;
  max-height: 1000px;
  opacity: 1;
  margin-top: var(--s5);                 /* 16px */
}

.fx-roas-calculator .accordion-content.hide {
  max-height: 0;
  opacity: 0;
  margin-top: 0;
}

.fx-roas-calculator .accordion-content .form-group-wrapper:last-child {
  margin-bottom: 0px;
}


/* =======================================
   RESULTS SECTION
   ======================================= */
.fx-roas-calculator .calc-results-section {
  width: 100%;
}

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

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

.fx-roas-calculator .results-actions .fx-btn {
  margin: 0;
  white-space: nowrap;
}

.fx-roas-calculator .results-actions .fx-btn {
  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);
  border: none !important;
  color: var(--Primary-Darkest-Gray, #222);
  font-family: var(--font-inter);
  font-size: 21px !important;
  font-style: normal;
  font-weight: 600 !important;
  line-height: 35px !important;
}

.fx-roas-calculator .results-actions .fx-btn.ai-interpretation-btn {
  border-radius: var(--spacing-1, 8px);
  background: var(--Primary-Blue, #207DE9) !important;
  color: white !important;
}

.fx-roas-calculator .results-actions .fx-btn.ai-interpretation-btn:hover {
  background:#116FDA!important;
}

.fx-roas-calculator .results-actions .fx-btn.ai-interpretation-btn:disabled {
  cursor: not-allowed;
  opacity: 0.6 !important;
}

.fx-roas-calculator .results-actions .fx-btn.ai-interpretation-btn:disabled:hover {
  background: var(--Primary-Blue, #207DE9) !important;
}

.fx-roas-calculator .results-actions .fx-btn.save-results-btn:disabled {
  cursor: not-allowed;
  opacity: 0.6 !important;
}

.fx-roas-calculator .results-actions .fx-btn.save-results-btn:disabled:hover {
  background: var(--White, #FFF) !important;
}

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

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

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


/* =======================================
   BUTTON STYLES
   ======================================= */
.fx-roas-calculator .fx-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--calc-border-radius);
  font-weight: 600;
  font-size: 16px;
  transition: var(--calc-transition);
  cursor: pointer;
  border: none;
  text-decoration: none;
}

.fx-roas-calculator .fx-primary-btn {
  background: var(--calc-primary-vivid);
  color: var(--Primary-White);
}

.fx-roas-calculator .fx-primary-btn:hover {
  background: var(--calc-primary-vivid-dark);
}

.fx-roas-calculator .fx-btn-large {
  padding: 16px 32px;
  font-size: 18px;
}


/* =======================================
   UTILITY CLASSES
   ======================================= */
.fx-roas-calculator .btn-block {
  display: block;
  width: 100%;
}

.fx-roas-calculator .hide {
  display: none !important;
}


/* =======================================
   CALCULATION HISTORY - CUSTOM DROPDOWN
   ======================================= */
.fx-roas-calculator .quick-history-section {
  margin-bottom: var(--s5);                    /* 32px */
}

/* Dropdown Wrapper */
.fx-roas-calculator .history-dropdown-wrapper {
  width: 100%;
  position: relative;
  border-radius: var(--s1, 8px);
  background: rgba(204, 228, 255, 0.30);
}

/* Dropdown Trigger Button */
.fx-roas-calculator .history-dropdown-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--s2) var(--s3);                /* 16px 24px */
  background: var(--Primary-White);
  border: 2px solid var(--Primary-Blue-Lightest);
  border-radius: var(--s2);                    /* 16px */
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: var(--font-inter);
  color: var(--Primary-Darkest-Gray);
  background: transparent;
  border: none;
  box-shadow: none;
  border-radius: 0px;
  padding: 16px;
}

.fx-roas-calculator .dropdown-label {
  display: flex;
  align-items: center;
  gap: var(--s1-5);                            /* 12px */
  color: var(--Primary-Darkest-Gray, #222);
  font-family: Inter;
  font-size: 21px;
  font-style: normal;
  font-weight: 600;
  line-height: 35px;
}

.fx-roas-calculator .dropdown-label svg {
  width: 24px;
  height: 24px;
}

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

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

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

/* Dropdown Content */
.fx-roas-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);      /* 16px bottom corners */
  margin-top: -8px;
  transition: all 0.3s ease;
}

.fx-roas-calculator .history-dropdown-content.open {
  max-height: 600px;
  opacity: 1;
  overflow-y: auto;
  background: transparent;
  box-shadow: none;
  border: none;
  border-radius: 0px;
}

/* Tags List */
.fx-roas-calculator .history-tags-list {
  background: transparent;
  padding: 0px 16px 16px 16px;
}

.fx-roas-calculator .history-tags-list-inner {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);                              /* 16px */
  padding-top: 16px;
  border-top: 1px solid var(--Primary-Blue-Lightest, #CCE4FF);
}

/* Individual History Tag Item */
.fx-roas-calculator .history-tag-item {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: var(--s1);                              /* 8px */
  cursor: pointer;
  transition: all 0.3s ease;
  padding: var(--s1) var(--s2);
  border-radius: var(--s2, 16px);
  background: var(--White, #FFF);
  border: 1px solid transparent;
  max-width: max-content;
}

.fx-roas-calculator .history-tag-item:hover,
.fx-roas-calculator .history-tag-item.selected {
  border: 1px solid var(--Primary-Blue, #207DE9);
}

.fx-roas-calculator .history-tag-item:hover .tag-campaign-name,
.fx-roas-calculator .history-tag-item.selected .tag-campaign-name {
  color: var(--Primary-Blue, #207DE9);
}

.fx-roas-calculator .tag-campaign-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;  
  color: var(--Primary-Dark-Gray, #6E7B81);
  font-family: var(--font-inter);
  font-size: 18px;
  font-style: normal;
  font-weight: 600;
  line-height: 28px;
  letter-spacing: -0.081px;  
}

.fx-roas-calculator .tag-roas-value {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 5px;
  border: 1px solid var(--Primary-Blue-Lightest, #CCE4FF);
  background: linear-gradient(0deg, rgba(204, 228, 255, 0.35) 0%, rgba(204, 228, 255, 0.35) 100%), #FFF;
  color: var(--Primary-Blue, #207DE9);
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  width: fit-content;
}

.fx-roas-calculator .rate-value {
  font-size: 14px;
  font-weight: 800;
}

/* History Footer */
.fx-roas-calculator .history-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--Primary-Blue-Lightest);
  background: var(--Core-Blue-blue-00);
  border: none;
  background: transparent;
  border-radius: 0px;
  padding: 0px 16px 16px 16px;
}

.fx-roas-calculator .history-last-updated {
  display: flex;
  align-items: center;
  gap: var(--s1);                              /* 8px */
  color: #222;
  font-family: var(--font-inter);
  font-size: 15px;
  font-style: normal;
  font-weight: 400;
  line-height: 150%;
  letter-spacing: -0.045px;
}

.fx-roas-calculator .history-clear-button {
  display: flex;
  align-items: center;
  gap: var(--s1);                              /* 8px */
  cursor: pointer;
  transition: all 0.3s ease;
  color: var(--Primary-Darkest-Gray, #222);
  font-family: var(--s1);
  font-size: 21px;
  font-style: normal;
  font-weight: 600;
  line-height: 35px;
  padding: 0px;
  border: none;
  background: none;
}

.fx-roas-calculator .history-clear-button svg {
  width: 24px;
  height: 24px;
}


/* =======================================
   AI INTERPRETATION CONTAINER
   ======================================= */
.fx-roas-calculator .ai-interpretation-container {
  width: 100%;
  border-radius: var(--s2, 16px);
  background: var(--White, #FFF);
  animation: slideDown 0.3s ease-out;
  margin-bottom: var(--s5);
  border-left: 3px solid var(--Primary-Blue, #207DE9);
  background: var(--Core-Blue-blue-00, #F9FBFF);
  border-radius: 0px;
  padding: 16px;
}

.fx-roas-calculator .ai-interpretation-content {
  color: var(--Primary-Darkest-Gray, #222);
  font-family: var(--font-inter);
  font-size: 15px;
  font-style: normal;
  font-weight: 400;
  line-height: 21px;
}

/* AI Loading State */
.fx-roas-calculator .ai-loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0px;
  padding: 0px;
  gap: 10px;
}

.fx-roas-calculator .loading-dots {
  display: flex;
  gap: 4px;
  align-items: center;
}

.fx-roas-calculator .loading-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--Primary-Blue, #207DE9);
  animation: bounce 1.4s infinite ease-in-out both;
}

.fx-roas-calculator .loading-dots span:nth-child(1) {
  animation-delay: -0.32s;
}

.fx-roas-calculator .loading-dots span:nth-child(2) {
  animation-delay: -0.16s;
}

.fx-roas-calculator .ai-loading-state p {
  margin: 0;
  color: var(--Primary-Darkest-Gray, #222);
  text-align: center;
  font-family: var(--font-inter);
  font-size: 15px;
  font-style: normal;
  font-weight: 600;
  line-height: 21px;
}

/* AI Error Message */
.fx-roas-calculator .ai-error-message {
  padding: var(--s3);
  text-align: center;
  color: var(--Tertiary-Red, #F04D50);
  background: var(--Tertiary-Red-Lightest);
  border-radius: var(--s1);
  border: 1px solid var(--Tertiary-Red-Lighter);
  font-size: 16px;
  font-weight: 500;
}

@keyframes bounce {
  0%, 80%, 100% {
    transform: scale(0.8);
    opacity: 0.5;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/* =======================================
   HISTORY TOAST NOTIFICATIONS
   ======================================= */
.roas-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: 16px;
  border-radius: 8px;
  border: 1px solid var(--Primary-Blue-Lightest, #CCE4FF);
  background: rgba(246, 246, 246, 0.80);
  backdrop-filter: blur(8px);
  max-width: 360px;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

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

.roas-history-toast .toast-calculation {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: var(--s1);
  padding: var(--s1) var(--s2);
  background: var(--White, #FFF);
  border-radius: var(--s2, 16px);
  border: 1px solid var(--Primary-Blue, #207DE9);
}

.roas-history-toast .toast-campaign {
  font-family: var(--font-inter);
  font-size: 18px;
  font-weight: 600;
  color: var(--Primary-Blue, #207DE9);
  line-height: 28px;
  letter-spacing: -0.081px;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.roas-history-toast .toast-roas {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  padding: 4px 8px;
  border-radius: 5px;
  border: 1px solid var(--Primary-Blue-Lightest, #CCE4FF);
  background: linear-gradient(0deg, rgba(204, 228, 255, 0.35) 0%, rgba(204, 228, 255, 0.35) 100%), #FFF;
  color: var(--Primary-Blue, #207DE9);
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
}

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

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


/* =======================================
   RESPONSIVE ADJUSTMENTS
   ======================================= */
@media (min-width: 769px) and (max-width: 991px) {
  /* Tablet: Equal width for left and right form wrappers */
  .fx-roas-calculator .form-group-wrapper-left,
  .fx-roas-calculator .form-group-wrapper-right {
    flex: 1;
    width: 50%;
  }
}

@media (max-width: 991px) {
  .fx-roas-calculator {
    padding: var(--s8) 0 var(--s12);
  }
  
  .fx-roas-calculator header {
    padding: 60px 0px 140px 0px;
  }
  
  .fx-roas-calculator-content {
    margin-top: -100px;
  }
}

@media (max-width: 768px) {
  .fx-roas-calculator {
    padding: var(--s6) 0 var(--s10);
  }
  
  .fx-roas-calculator header {
    padding: 40px 0px 120px 0px;
  }
  
  .fx-roas-calculator-content {
    margin-top: -80px;
  }
  
  .fx-roas-calculator .lead {
    font-size: 18px;
    line-height: 28px;
  }
  
  .fx-roas-calculator .modern-calc-form {
    padding: var(--s3);                  /* 24px */
  }

  /* Full-width result wrapper on mobile */
  .fx-roas-calculator .form-group.result-wrapper {
    width: 100%;
  }

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

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

  .fx-roas-calculator .tooltip-text {
    width: 250px;
    margin-left: -125px;
    font-size: 13px;
  }
  
  .fx-roas-calculator .results-actions {
    flex-direction: column;
    width: 100%;
    gap: var(--s1);                      /* 8px */
  }

  /* Quick history responsive for mobile */
  .fx-roas-calculator .quick-history-section {
    margin-bottom: var(--s3);            /* 24px */
  }

  /* Mobile Dropdown Adjustments */
  .fx-roas-calculator .history-dropdown-trigger {
    padding: var(--s1-5) var(--s2);      /* 12px 16px */
  }

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

  .fx-roas-calculator .history-tags-list-inner {
    gap: var(--s1-5);                    /* 12px */
    padding: var(--s2);                  /* 16px */
  }

  .fx-roas-calculator .history-footer {
    flex-direction: column;
    gap: var(--s1-5);                    /* 12px */
    align-items: stretch;
  }

  .fx-roas-calculator .history-last-updated {
    justify-content: center;
    font-size: 12px;
  }

  .fx-roas-calculator .history-clear-button {
    width: 100%;
    justify-content: center;
  }

  /* AI Interpretation responsive */
  .fx-roas-calculator .ai-interpretation-container {
    padding: var(--s3);
  }

  .fx-roas-calculator .ai-loading-state p {
    font-size: 16px;
  }

  /* Toast notifications responsive */
  .roas-history-toast {
    top: var(--s2);
    right: var(--s2);
    left: var(--s2);
    max-width: none;
  }

  .roas-history-toast .toast-header {
    font-size: 18px;
    line-height: 28px;
  }

  .roas-history-toast .toast-campaign {
    font-size: 16px;
  }

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

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

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

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

  /* Extra Small Mobile - History Dropdown */
  .fx-roas-calculator .dropdown-label {
    font-size: 14px;
  }

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

  .fx-roas-calculator .history-tag-item {
    padding: var(--s1-5);                /* 12px */
  }

  .fx-roas-calculator .tag-campaign-name {
    font-size: 13px;
  }

  .fx-roas-calculator .tag-roas-value {
    font-size: 11px;
  }

  .fx-roas-calculator .dropdown-label svg {
    display: none;
  }

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

  /* AI Interpretation extra small mobile */
  .fx-roas-calculator .ai-interpretation-container {
    padding: var(--s2);
  }

  .fx-roas-calculator .ai-loading-state {
    padding: var(--s3) 0;
  }

  .fx-roas-calculator .ai-loading-state p {
    font-size: 14px;
  }

  .fx-roas-calculator .loading-dots span {
    width: 10px;
    height: 10px;
  }
}

