.tool-section {
  /* Light theme palette (user-provided) */
  --wfa-bg: #f4f7f4;         /* Background */
  --wfa-panel: #e8efe8;      /* Panel / Cream */
  --wfa-accent: #3a7d6e;     /* Accent / Buttons / Bars */
  --wfa-accent-hover: #2d6457; /* Accent hover */
  --wfa-secondary: #5aab98;  /* Secondary accent */
  --wfa-muted: #7a9e98;      /* Muted text */
  --wfa-border: #ccddd9;     /* Borders */
  --wfa-text: #1c2b2b;       /* Text / Ink */

  /* Back-compat aliases used throughout the file */
  --wfa-teal: var(--wfa-accent);
  --wfa-green: var(--wfa-panel);
}

.wfa-shell {
  max-width: 1100px;
  margin: 0 auto;
}

/* --- Content + FAQ (match SERP Preview Tool content-card + accordion styling) --- */
#wfaContent .content-card{
  margin-top: 100px; /* gap after tool section */
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

#wfaContent .content-card h2{
  margin: 0 0 12px 0;
  color: black;
  font-size: 30px;
  line-height: 1.25;
  font-weight: 700;
}

#wfaContent .content-card h3{
  margin: 18px 0 8px;
  color: black;
  font-size: 22px;
  line-height: 1.3;
  font-weight: 600;
}

#wfaContent .content-card p{
  margin: 0 0 12px;
  color: black;
  font-size: 16px;
  line-height: 1.55;
  font-weight: 400;
}

#wfaContent .content-card ol,
#wfaContent .content-card ul{
  margin: 0 0 12px;
  padding-left: 26px;
  list-style-position: outside;
  color: black;
  line-height: 1.55;
}

#wfaContent .content-card ul{ list-style: disc; }
#wfaContent .content-card ol{ list-style: decimal; }

#wfaContent .content-card li{
  margin: 0 0 8px;
  color: black;
  font-size: 16px;
  line-height: 1.55;
  font-weight: 400;
  display: list-item;
  padding-left: 6px;
}

/* FAQ styles (scoped to this page/content block) */
#wfaContent .serp-faq.FaqSection .FaqTitle h2 { margin-bottom: 30px; }

#wfaContent .serp-faq.first-faq-block .accordian-wrapper {
  background: linear-gradient(138deg, #fff0 0%, #fff0 100%);
  padding: .15rem;
  border-radius: 15px;
  position: relative;
}

#wfaContent .serp-faq.first-faq-block .faq-boxes {
  background-color: #fff;
  backdrop-filter: blur(10px);
  padding: 0;
  border-radius: 15px;
  border: 2px solid #a200ff38;
}

#wfaContent .serp-faq.first-faq-block .faq-boxes.active {
  background-color: #FBF4FF;
  border: 2px solid #A200FF;
}

#wfaContent .serp-faq .accordion-body {
  padding: 0 15px 18px 22px;
  font-size: 20px;
  font-weight: 400;
  color: #000;
}

#wfaContent .serp-faq .accordion-button {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  padding: 18px 15px 18px 22px;
  font-size: 1rem;
  color: #212529;
  text-align: left;
  background-color: #fff0;
  border: 0;
  border-radius: 0;
  overflow-anchor: none;
  transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out, border-radius .15s ease;
}

#wfaContent .serp-faq .accordion-button h3 {
  font-weight: 600;
  font-size: 20px;
  margin: 0;
  line-height: 1.3;
}

#wfaContent .serp-faq.first-faq-block .get-started-faq-inner .accordion .accordion-item .accordion-button:not(.collapsed)::before {
  border: 6px solid #c3dae7;
  background-color: #0582d2;
  top: 28%;
}

#wfaContent .serp-faq .accordion-button:not(.collapsed) {
  color: #212529;
  background-color: #fff0;
  transition: 0.2s ease-in all;
  padding-bottom: 12px;
  border: 0;
  box-shadow: none;
}

#wfaContent .serp-faq .accordion-button h3{ color: #000; }

#wfaContent .serp-faq .accordion-button:focus {
  z-index: 3;
  border-color: #cecbdc;
  outline: 0;
  box-shadow: 0 0 0 .25rem #fff0;
}

#wfaContent .serp-faq.first-faq-block .accordion-item {
  background-color: #fff0;
  border: 0 solid rgb(0 0 0 / .125);
  margin-bottom: 20px;
}

#wfaContent .serp-faq.first-faq-block .accordion-body p {
  font-size: 16px;
  color: #000;
  font-weight: 400;
  margin-bottom: 0;
  padding-right: 11%;
  line-height: 26px;
}

#wfaContent .serp-faq.first-faq-block .accordion-body p a {
  color: #4A2574;
  font-size: 18px;
  line-height: 32px;
  text-decoration: none;
  font-weight: 400;
}

#wfaContent .serp-faq.first-faq-block .accordion-button:not(.collapsed)::after {
  content: "–";
  transform: none;
}

#wfaContent .serp-faq.first-faq-block .accordion-button::after {
  margin-left: auto;
  content: "+";
  width: 24px;
  height: 24px;
  min-width: 24px;
  flex: 0 0 24px;
  align-self: center;
  margin-right: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  line-height: 1;
  font-weight: 700;
  color: #4A2574;
}

/* Collapse behavior (we implement via JS; keep same class names) */
#wfaContent .serp-faq .accordion-collapse{ display: none; }
#wfaContent .serp-faq .accordion-collapse.show{ display: block; }

@media (max-width: 480px){
  #wfaContent .serp-faq.first-faq-block .faq-boxes{ padding-right: 18px; }
}

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

/* Input panel */
.wfa-input {
  background: var(--wfa-bg);
  border: 1px solid var(--wfa-border);
  padding: 14px;
}

.wfa-input-head {
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--wfa-border);
  margin-bottom: 10px;
}

.wfa-input-title {
  font-size: 14px;
  letter-spacing: 0.32em;
  color: var(--wfa-muted);
  padding: 6px 0 10px;
}

.wfa-textarea {
  width: 100%;
  min-height: 320px;
  resize: vertical;
  padding: 18px;
  border: 1px solid var(--wfa-border);
  background: var(--wfa-panel);
  color: var(--wfa-text);
  font-size: 18px;
  line-height: 1.65;
  outline: none;
}

.wfa-textarea::placeholder {
  font-style: italic;
  color: var(--wfa-muted);
}

.wfa-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
  padding: 14px 2px 10px;
}

.wfa-check {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  user-select: none;
}

.wfa-check input {
  width: 16px;
  height: 16px;
  accent-color: var(--wfa-accent);
}

.wfa-check-label {
  font-size: 13px;
  letter-spacing: 0.24em;
  color: var(--wfa-muted);
  font-weight: 600;
}

.wfa-field {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.wfa-field-label {
  font-size: 13px;
  letter-spacing: 0.22em;
  color: var(--wfa-muted);
  font-weight: 600;
}

.wfa-number {
  width: 64px;
  height: 28px;
  border: 1px solid var(--wfa-border);
  background: var(--wfa-bg);
  color: var(--wfa-text);
  padding: 4px 8px;
  font-size: 14px;
}

.wfa-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-top: 4px;
}

.wfa-btn {
  height: 44px;
  padding: 0 18px;
  border: 1px solid var(--wfa-border);
  font-weight: 700;
  letter-spacing: 0.18em;
  font-size: 12px;
  cursor: pointer;
}

.wfa-btn-primary {
  background: var(--wfa-accent);
  border-color: var(--wfa-accent);
  color: var(--wfa-bg);
}

.wfa-btn-primary:hover {
  background: var(--wfa-accent-hover);
  border-color: var(--wfa-accent-hover);
}

.wfa-btn-ghost {
  background: transparent;
  color: var(--wfa-text);
}

/* Stats */
.wfa-stats {
  margin-top: 18px;
  background: var(--wfa-bg);
  border: 1px solid var(--wfa-border);
  padding: 18px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 26px;
}

/* Don’t leave extra gaps when results are hidden */
.wfa-results[hidden] {
  display: none;
}

@media (max-width: 820px) {
  .wfa-stats {
    grid-template-columns: 1fr;
  }
}

.wfa-stat {
  background: var(--wfa-panel);
  border-radius: 3px;
  padding: 18px 22px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.wfa-stat-label {
  font-size: 20px;
  color: var(--wfa-text);
}

.wfa-stat-value {
  font-size: 22px;
  color: var(--wfa-text);
  font-weight: 700;
}

/* Panels */
.wfa-panel {
  margin-top: 22px;
  border: 1px solid var(--wfa-border);
  background: var(--wfa-panel);
}

.wfa-panel-title {
  background: var(--wfa-teal);
  color: #ffffff;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 12px 16px;
}

.wfa-table-wrap {
  padding: 14px 16px 18px;
}

@media (max-width: 767px) {
  .wfa-table-wrap {
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
  }

  /* Keep the table within the scroll container instead of overflowing the page */
  .wfa-table-wrap table.dataTable {
    min-width: 100%;
    width: max-content;
  }
}

/* DataTables layout / buttons */
div.dt-container {
  font-size: 14px;
}

/* DataTables info row ("Showing 1 to 20 of ...") */
div.dt-container .dt-info {
  margin-top: 10px;
  margin-bottom: 10px;
}

table.dataTable {
  border: 1px solid var(--wfa-border);
  border-radius: 8px;
  overflow: hidden;
}

table.dataTable thead th {
  background: var(--wfa-bg);
  border-bottom: 1px solid var(--wfa-border);
  color: var(--wfa-text);
  font-weight: 700;
}

table.dataTable tbody td {
  border-bottom: 1px solid var(--wfa-border);
}

table.dataTable tbody tr:nth-child(odd) {
  background: var(--wfa-bg);
}

table.dataTable tbody tr:hover {
  background: var(--wfa-panel);
}

.dt-buttons .dt-button {
  background: var(--wfa-panel) !important;
  border: 1px solid var(--wfa-border) !important;
  border-radius: 2px !important;
  padding: 7px 14px !important;
  margin-right: 6px !important;
  color: var(--wfa-text) !important;
}

.dt-buttons .dt-button:hover {
  background: var(--wfa-bg) !important;
  border-color: var(--wfa-accent) !important;
}

.dt-paging {
  margin-top: 12px;
}

.dt-paging .dt-paging-button {
  border: 1px solid var(--wfa-border) !important;
  background: var(--wfa-panel) !important;
  border-radius: 8px !important;
  padding: 6px 12px !important;
  margin: 0 3px !important;
  color: var(--wfa-text) !important;
}

.dt-paging .dt-paging-button.current,
.dt-paging .dt-paging-button.current:hover {
  border-color: var(--wfa-accent) !important;
  background: var(--wfa-accent) !important;
  color: var(--wfa-bg) !important;
  
}

.dt-paging .dt-paging-button:hover {
  border-color: var(--wfa-accent) !important;
  background: var(--wfa-bg) !important;
  color: var(--wfa-text) !important;
}

/* DataTables sets white text on hover; force dark text for non-current page numbers */
.dt-container .dt-paging .dt-paging-button:not(.current):hover,
.dt-container .dt-paging .dt-paging-button:not(.current):focus,
.dt-container .dt-paging .dt-paging-button:not(.current):active {
  color: var(--wfa-text) !important;
}

.dt-paging .dt-paging-button:focus {
  color: var(--wfa-text) !important;
}

.dt-paging .dt-paging-button.disabled,
.dt-paging .dt-paging-button.disabled:hover {
  color: var(--wfa-muted) !important;
  border-color: var(--wfa-border) !important;
  background: var(--wfa-panel) !important;
}

.dt-search {
  float: right;
}

.dt-search input {
  height: 30px;
  border: 1px solid var(--wfa-border);
  padding: 4px 10px;
  background: var(--wfa-panel);
  color: var(--wfa-text);
}

table.dataTable thead th {
  font-weight: 700;
}

/* POS pill */
.wfa-pos {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--wfa-accent, #3a7d6e);
  color: var(--wfa-bg, #f4f7f4);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.wfa-pos-plus {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 8px;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 800;
  background: var(--wfa-secondary, #5aab98);
  color: var(--wfa-bg, #f4f7f4);
  border: 0;
  cursor: pointer;
  line-height: 1;
}

.wfa-pos-plus:focus {
  outline: 2px solid rgba(58, 125, 110, 0.35);
  outline-offset: 2px;
}

/* POS popover (matches reference click on +N) */
.wfa-pos-popover-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.22);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow: auto;
  box-sizing: border-box;
}

/* Ensure the native hidden attribute actually hides the overlay.
   (Otherwise display:flex above can override the UA [hidden]{display:none} rule.) */
.wfa-pos-popover-overlay[hidden] {
  display: none !important;
}

.wfa-pos-popover {
  position: relative;
  top: auto;
  left: auto;
  transform: none;
  width: min(420px, calc(100vw - 32px));
  background: var(--wfa-bg, #f4f7f4);
  border: 1px solid var(--wfa-border, #ccddd9);
  border-radius: 10px;
  max-height: calc(100vh - 140px);
  overflow: auto;
}

.wfa-pos-popover-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--wfa-border, #ccddd9);
}

.wfa-pos-popover-title {
  font-weight: 700;
  color: var(--wfa-text, #1c2b2b);
  font-size: 18px;
}

.wfa-pos-popover-close {
  border: 0;
  background: transparent;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  color: var(--wfa-muted, #7a9e98);
  padding: 2px 6px;
}

.wfa-pos-popover-close:hover {
  color: var(--wfa-text, #1c2b2b);
}

.wfa-pos-popover-body {
  padding: 12px 16px 14px;
  background: var(--wfa-panel, #e8efe8);
}

.wfa-pos-popover-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
}

.wfa-pos-popover-count {
  color: var(--wfa-muted, #7a9e98);
  font-weight: 600;
}


/* Charts */
.wfa-panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

/* Allow grid children to shrink; prevents 0-width chart measurements in some layouts */
.wfa-panels > .wfa-panel {
  min-width: 0;
}

@media (max-width: 980px) {
  .wfa-panels {
    grid-template-columns: 1fr;
  }
}

.wfa-chart {
  height: 440px;
  padding: 10px 10px 16px;
  min-width: 0;
}

/* Highcharts mount: fill the content box (avoids padding/grid sizing quirks) */
.wfa-chart-inner {
  width: 100%;
  height: 100%;
}


.wfa-chart-head {
  padding: 12px 14px 0;
}

.wfa-chart-toggle {
  display: inline-flex;
  gap: 10px;
  border: 1px solid var(--wfa-border);
  padding: 10px;
  border-radius: 12px;
  background: var(--wfa-panel);
}

.wfa-iconbtn {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 1px solid var(--wfa-border);
  background: var(--wfa-panel);
  cursor: pointer;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 767px) {
  .wfa-chart {
    /* On mobile, fixed small heights can clip Highcharts axes/credits.
       Use a responsive height that still guarantees enough vertical space. */
    height: clamp(480px, 72vh, 640px);
    padding: 8px 8px 12px;
  }

  .wfa-chart-head {
    padding: 10px 10px 0;
  }

  .wfa-chart-toggle {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px;
  }

  .wfa-iconbtn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
  }
}

@media (max-width: 420px) {
  .wfa-chart {
    height: clamp(460px, 72vh, 620px);
  }
}

.wfa-iconbtn:hover {
  border-color: var(--wfa-accent);
}

.wfa-iconbtn.is-active {
  border-color: var(--wfa-accent);
  box-shadow: 0 0 0 2px rgba(58, 125, 110, 0.15);
}


.wfa-iconbtn svg {
  width: 18px;
  height: 18px;
}

.wfa-iconbtn svg rect,
.wfa-iconbtn svg circle,
.wfa-iconbtn svg polyline,
.wfa-iconbtn svg path {
  fill: none;
  stroke: var(--wfa-text);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.wfa-iconbtn:hover svg rect,
.wfa-iconbtn:hover svg circle,
.wfa-iconbtn:hover svg polyline,
.wfa-iconbtn:hover svg path {
  stroke: var(--wfa-accent-hover);
}

.wfa-iconbtn.is-active svg rect,
.wfa-iconbtn.is-active svg circle,
.wfa-iconbtn.is-active svg polyline,
.wfa-iconbtn.is-active svg path {
  stroke: var(--wfa-accent);
}

/* DataTables top controls spacing */
.dt-buttons {
  margin-bottom: 12px;
}

.dt-search {
  margin-bottom: 12px;
}

.dt-search label {
  font-weight: 700;
}

.dt-table {
  margin-top: 10px;
}
/* Remove the global container bottom gap for this tool page */
.main > .container{
  margin-bottom: 0;
}
