/*
 * Team Spend on Elementor.
 * The original site CSS (uploads/teamspend/site.css) is the design source of truth and Elementor's own
 * stylesheets load in a lower cascade layer (see functions.php). This file only covers what the original
 * markup never had: Elementor's tabs, toggle (FAQ), form and theme-part wrappers, plus the zero-specificity
 * resets that make Elementor wrappers behave like the plain divs of the original.
 */

body.teamspend-page {
  background: #fff;
}

body.teamspend-page .elementor-widget {
  margin-bottom: 0 !important;
}

/* Inline-style equivalents the builder turns into classes. */
body.teamspend-page .e-con.hero.hero-tight {
  padding-bottom: 30px;
}

body.teamspend-page .e-con.pad-top-16 {
  padding-top: 16px;
}

body.teamspend-page .e-con.hero .e-con.wrap:not(.hero-grid) {
  grid-template-columns: 1fr;
}

/* FAQ: Elementor accordion styled as the original .fq cards */
body.teamspend-page .elementor-toggle .elementor-toggle-item {
  border: 1px solid #e3e4e1 !important;
  border-radius: 12px;
  margin-bottom: 10px;
  overflow: hidden;
  background: #fff;
}

body.teamspend-page .elementor-toggle .elementor-tab-title {
  display: flex;
  flex-direction: row-reverse;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  box-sizing: border-box;
  min-height: 44px;
  margin: 0;
  padding: 18px 22px;
  border: 0 !important;
  background: none;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
  color: #1f2020;
  text-align: left;
  cursor: pointer;
}

body.teamspend-page .elementor-toggle .elementor-tab-title:hover {
  background: #f9faf8;
}

body.teamspend-page .elementor-toggle .elementor-toggle-title {
  flex: 1;
  margin: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  text-decoration: none;
}

body.teamspend-page .elementor-toggle .elementor-toggle-icon {
  display: flex;
  flex: 0 0 22px;
  align-items: center;
  justify-content: center;
  float: none;
  width: 22px;
  height: 22px;
  margin: 0;
  padding: 0;
  border-radius: 50%;
  background: #eaf3de;
  color: #5f8a39;
  transition: transform 0.25s;
}

body.teamspend-page .elementor-toggle .elementor-toggle-icon .elementor-toggle-icon-closed {
  display: flex !important;
}

body.teamspend-page .elementor-toggle .elementor-toggle-icon .elementor-toggle-icon-opened {
  display: none !important;
}

body.teamspend-page .elementor-toggle .elementor-toggle-icon svg {
  width: 10px;
  height: 10px;
  fill: currentColor;
}

body.teamspend-page .elementor-toggle .elementor-tab-title.elementor-active .elementor-toggle-icon {
  transform: rotate(45deg);
}

body.teamspend-page .elementor-toggle .elementor-tab-content {
  padding: 0;
  border: 0 !important;
  font-size: 15px;
  color: #424344;
}

body.teamspend-page .elementor-toggle .elementor-tab-content p {
  margin: 0;
  padding: 0 22px 20px;
  font-size: 15px;
  color: #424344;
}

body.teamspend-page .teamspend-form .elementor-field-group {
  margin-bottom: 16px;
}

body.teamspend-page .teamspend-form .elementor-button {
  width: 100%;
  background: #7fb04f;
  color: #0e1e2b;
  border-radius: 5px;
  font-weight: 700;
}

.elementor-location-header {
  position: sticky;
  top: 0;
  z-index: 40;
}

.elementor-location-header .e-con.ts-passthrough,
.elementor-location-footer .e-con.ts-passthrough {
  padding: 0 !important;
  max-width: none !important;
  width: 100% !important;
}

footer.elementor-element,
.elementor-location-footer footer {
  background: #0e1e2b !important;
  color: #a9b7c0;
  padding: 52px 0 32px !important;
}

@media (max-width: 760px) {
  .elementor-location-header .nav-l {
    display: none !important;
  }

  .elementor-location-header .burger {
    display: flex !important;
  }
}

/* Logo image */
body.teamspend-page .brand-logo { height: 46px; width: auto; display: block; }
body.teamspend-page .foot-logo { height: 44px; width: auto; display: block; background: #fff; padding: 8px 12px; border-radius: 10px; }
@media (max-width: 767px) { body.teamspend-page .brand-logo { height: 38px; } }

/* Zero-specificity reset: Elementor widgets behave like the plain elements of the original markup,
   original rules still win. */
:where(body.teamspend-page) :where(.elementor-widget-heading, .elementor-widget-text-editor, .elementor-widget-button, .elementor-widget-image, .elementor-widget-teamspend-screen, .elementor-widget-html),
:where(body.teamspend-page) :where(.elementor-widget-heading, .elementor-widget-text-editor, .elementor-widget-button, .elementor-widget-image, .elementor-widget-teamspend-screen, .elementor-widget-html) > :where(.elementor-widget-container) {
  display: contents;
}

:where(body.teamspend-page) :where(.elementor-widget-text-editor, .elementor-widget-button .elementor-button, .elementor-widget-image) {
  font-family: inherit;
  font-weight: inherit;
  color: inherit;
  letter-spacing: inherit;
  line-height: inherit;
}

:where(body.teamspend-page) :where(.elementor-heading-title) {
  font-family: inherit;
  font-weight: bold;
  color: inherit;
  letter-spacing: normal;
  line-height: inherit;
  padding: 0;
}
:where(body.teamspend-page) :where(h1.elementor-heading-title) { font-size: 2em; margin: 0.67em 0; }
:where(body.teamspend-page) :where(h2.elementor-heading-title) { font-size: 1.5em; margin: 0.83em 0; }
:where(body.teamspend-page) :where(h3.elementor-heading-title) { font-size: 1.17em; margin: 1em 0; }
:where(body.teamspend-page) :where(h4.elementor-heading-title) { font-size: 1em; margin: 1.33em 0; }
:where(body.teamspend-page) :where(h5.elementor-heading-title) { font-size: 0.83em; margin: 1.67em 0; }
:where(body.teamspend-page) :where(h6.elementor-heading-title) { font-size: 0.67em; margin: 2.33em 0; }

/* Elementor containers behave like the plain divs of the original markup unless the original CSS says otherwise. */
:where(body.teamspend-page .e-con) {
  position: static;
  display: block;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: normal;
  justify-content: normal;
  gap: 0;
  row-gap: 0;
  column-gap: 0;
  padding: 0;
  margin: 0;
  width: auto;
  max-width: none;
  min-width: auto;
  min-height: 0;
}

body.teamspend-page .e-con.chips {
  gap: 10px !important;
}

/* Admins / Parents switch: Elementor nested tabs styled as the original sticky "Viewing the page for" bar. */
body.teamspend-page .e-n-tabs-content > .e-con:not(.e-active) {
  display: none !important;
}

body.teamspend-page .e-n-tabs-content > .e-con.e-active {
  display: block !important;
}

body.teamspend-page .e-n-tabs {
  display: block;
  width: 100%;
}

body.teamspend-page .e-n-tabs-heading {
  --ts-edge: max(32px, calc((100% - 1216px) / 2));
  position: sticky;
  top: calc(env(safe-area-inset-top, 0px) + 72px);
  z-index: 30;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  height: 62px;
  box-sizing: border-box;
  padding: 0 var(--ts-edge) 0 calc(var(--ts-edge) + 5px);
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #e3e4e1;
}

body.teamspend-page .e-n-tabs-heading::before {
  content: "Viewing the page for";
  order: 3;
  margin-left: 20px;
  font-size: 13px;
  font-weight: 700;
  color: #6f7d88;
}

body.teamspend-page .e-n-tabs-heading::after {
  content: "";
  position: absolute;
  left: var(--ts-edge);
  top: 50%;
  width: 180px;
  height: 48px;
  margin-top: -24px;
  box-sizing: border-box;
  border: 1px solid #e3e4e1;
  border-radius: 12px;
  background: #fff;
  z-index: 0;
}

body.teamspend-page .e-n-tabs-heading .e-n-tab-title {
  order: 1;
  position: relative;
  z-index: 1;
  flex: 0 0 83px;
  width: 83px;
  height: 38px;
  min-height: 0;
  margin: 0;
  padding: 0 16px;
  box-sizing: border-box;
  justify-content: center;
  align-items: center;
  border: 0;
  border-radius: 9px;
  background: none;
  box-shadow: none;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: normal;
  color: #424344;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

body.teamspend-page .e-n-tabs-heading .e-n-tab-title[aria-selected="true"] {
  background: #20556e;
  color: #fff;
}

body.teamspend-page .e-n-tabs-heading .e-n-tab-title .e-n-tab-title-text {
  font: inherit;
  color: inherit;
}

body.teamspend-page .e-n-tabs-content {
  display: block;
  width: 100%;
  border: 0;
  padding: 0;
}

@media (max-width: 760px) {
  body.teamspend-page .e-n-tabs-heading {
    --ts-edge: 20px;
    justify-content: flex-start;
    padding: 0 20px 0 25px;
  }
  body.teamspend-page .e-n-tabs-heading::before {
    display: none;
  }

}

body.teamspend-page .elementor-toggle .elementor-tab-content {
  font-family: inherit;
  font-weight: 400;
  line-height: inherit;
}

/* FAQ plus icon: centre the glyph in its circle */
body.teamspend-page .elementor-toggle .elementor-toggle-icon .elementor-toggle-icon-closed {
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
}

body.teamspend-page .elementor-toggle .elementor-toggle-icon svg {
  flex: 0 0 auto;
  margin: 0;
}

/* Anchor jumps clear the header plus the sticky Admins / Parents bar (same as the original .bswitch offset). */
html:has(.e-n-tabs-heading) {
  scroll-padding-top: calc(env(safe-area-inset-top, 0px) + 146px);
}

/* Form controls: give the native dropdown an explicit light surface so it never flashes dark when opened. */
body.teamspend-page .fld select,
body.teamspend-page .fld input,
body.teamspend-page .fld textarea {
  color-scheme: light;
  background-color: #fff;
  -webkit-tap-highlight-color: transparent;
}

body.teamspend-page .fld select {
  transition: border-color 0.2s;
}

body.teamspend-page .fld select:focus,
body.teamspend-page .fld select:active {
  background-color: #fff;
  color: #1f2020;
}

body.teamspend-page .fld select option {
  background-color: #fff;
  color: #1f2020;
}

/* FAQ plus icon: centre in the circle whether Elementor prints an inline SVG or a Font Awesome glyph. */
body.teamspend-page .elementor-toggle .elementor-toggle-icon {
  display: grid;
  place-items: center;
  padding: 0;
  line-height: 1;
  text-align: center;
}

body.teamspend-page .elementor-toggle .elementor-toggle-icon .elementor-toggle-icon-closed,
body.teamspend-page .elementor-toggle .elementor-toggle-icon i.elementor-toggle-icon-closed {
  display: grid !important;
  place-items: center;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  line-height: 1;
}

body.teamspend-page .elementor-toggle .elementor-toggle-icon svg,
body.teamspend-page .elementor-toggle .elementor-toggle-icon i {
  display: block;
  width: 10px;
  height: 10px;
  margin: 0;
  padding: 0;
  font-size: 10px;
  line-height: 10px;
  text-align: center;
}

body.teamspend-page .elementor-toggle .elementor-toggle-icon i::before {
  display: block;
  width: 10px;
  height: 10px;
  line-height: 10px;
  text-align: center;
}

/* FAQ plus: drawn with CSS so it is exactly centred in the circle on any setup (no SVG or icon-font metrics). */
body.teamspend-page .elementor-toggle .elementor-toggle-icon {
  position: relative;
}

body.teamspend-page .elementor-toggle .elementor-toggle-icon > * {
  display: none !important;
}

body.teamspend-page .elementor-toggle .elementor-toggle-icon::before,
body.teamspend-page .elementor-toggle .elementor-toggle-icon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  background: currentColor;
  border-radius: 1px;
  transform: translate(-50%, -50%);
}

body.teamspend-page .elementor-toggle .elementor-toggle-icon::before {
  width: 10px;
  height: 2px;
}

body.teamspend-page .elementor-toggle .elementor-toggle-icon::after {
  width: 2px;
  height: 10px;
}

/* FAQ icon: nothing Elementor adds (margins, floats, alignment classes) may move the plus off-centre. */
body.teamspend-page .elementor-toggle .elementor-toggle-icon,
body.teamspend-page .elementor-toggle .elementor-toggle-icon.elementor-toggle-icon-left,
body.teamspend-page .elementor-toggle .elementor-toggle-icon.elementor-toggle-icon-right {
  float: none !important;
  margin: 0 !important;
  padding: 0 !important;
  text-align: center !important;
}

body.teamspend-page .elementor-toggle .elementor-toggle-icon svg,
body.teamspend-page .elementor-toggle .elementor-toggle-icon i,
body.teamspend-page .elementor-toggle .elementor-toggle-icon span {
  margin: 0 !important;
  padding: 0 !important;
}

/* Admins / Parents switch stays on the left whatever Elementor version or tab alignment setting is in use. */
body.teamspend-page .e-n-tabs-heading {
  justify-content: flex-start !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
}

body.teamspend-page .e-n-tabs-heading .e-n-tab-title {
  flex-grow: 0 !important;
}
