/* ===========================
   TSF Cards Carousel (BEM-like)
   =========================== */

/* Outer container */
.tsf-cards-carousel__container {
  margin: 0 0 120px 0;
  box-sizing: border-box;
}

/* Inner wrapper, for background, padding, etc. */
.tsf-cards-carousel__inner {
  display: flex;
  flex-direction: column;
  border-radius: 30px;
  background-color: #dbdbdb;
  padding: 32px;
  position: relative;
  /* box-shadow: 0 2.4rem 3.2rem rgba(0, 0, 0, 0.12); */
}

/* The header area */
.tsf-cards-carousel__header {
}

/* The main title */
.tsf-cards-carousel__title {
  font-size: 30px !important;
  line-height: 1.3 !important;
  margin-bottom: 24px !important;
  font-weight: 500;
  position: relative;
  text-align: center;
}

.tsf-cards-carousel__text {
  display: none;
  font-size: 20px;
  line-height: 1.5;
  margin-bottom: 30px !important;
  font-weight: 500;
  text-align: center;
}

/* === Info Icon & Tooltip === */

/* Wrap icon + tooltip in a relative wrapper */
.tsf-cards-carousel__info-icon-wrapper {
  position: relative;
  display: inline-block; /* keep icon+tooltip together */
}

/* The info icon itself */
.tsf-cards-carousel__info-icon {
  font-size: 24px;
  color: #4a00ff;
  margin-left: 8px;
  cursor: pointer;
}

/* The tooltip text that appears 12px below the icon */
.tsf-cards-carousel__info-text {
  box-sizing: border-box;
  position: absolute;
  top: calc(100% + 12px); /* 12px below the icon wrapper */
  display: none; /* toggled via JS */
  z-index: 99;

  min-width: 280px;
  max-width: 400px;
  background-color: #fff;
  font-size: 18px;
  line-height: 1.5;
  border-radius: 24px;
  padding: 12px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.tsf-cards-carousel__info-icon-wrapper:hover .tsf-cards-carousel__info-text {
  display: block;
}

/* Main carousel wrapper (overflow hidden) */
.tsf-cards-carousel__wrapper {
  width: 100%;
  overflow: hidden;
}

/* Carousel track (flex container for cards) */
.tsf-cards-carousel__track {
  display: flex;
  flex-wrap: nowrap;
  transition: transform 0.5s ease;
  width: 100%;
  box-sizing: border-box;
  /* gap: 24px; */
}

.tsf-cards-carousel__track > *:last-child {
  margin-right: 0; /* Ensure last child doesn't overflow */
}

/* Outer card wrapper (each “slide”) */
.tsf-cards-carousel__card-outer {
  display: flex;
  font-size: 16px;
  line-height: 1.3;
  box-sizing: border-box;
  border: 2px solid #000;
  border-radius: 32px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  padding: 24px;
  min-width: calc(100% - 2px);
  margin-right: 24px;
}

/* The card content inside each wrapper */
.tsf-cards-carousel__card {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
}

/* Top bar */
.tsf-cards-carousel__card-top-bar {
  display: none;
}

/* Card header (title + type) */
.tsf-cards-carousel__card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tsf-cards-carousel__card-title {
  flex: 1;
  text-wrap: wrap;
  font-size: 22px;
  font-weight: 500;
  margin: 0 8px 0 0;
}

.tsf-cards-carousel__card-type {
  align-self: flex-start;
  text-align: center;
  font-size: 14px;
  padding: 12px;
  border-radius: 30px;
  border: 1px solid #000;
}

/* Card pricing & content */
.tsf-cards-carousel__card-price {
  display: block;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 1.5px;
  margin-bottom: 12px;
}

.tsf-cards-carousel__card-content p {
  font-size: 18px;
  line-height: 1.5;
  margin: 0;
}

.tsf-cards-carousel__card-helper-container {
  display: none;
}

/* Helper icon + text on hover */
.tsf-cards-carousel__helper-text-wrapper {
  margin-left: 8px;
  cursor: pointer;
}

.tsf-cards-carousel__helper-icon {
  font-size: 20px;
  fill: #000;
}

.tsf-cards-carousel__helper-text {
  position: absolute;
  max-width: 100%;
  background-color: #f3f4f6;
  color: #000;
  font-size: 16px;
  padding: 12px;
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  line-height: 1.5;
  top: 24px;
  left: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
  z-index: 10;
}

/* If we need to place it above the icon instead of below */
.tsf-cards-carousel__helper-text.flip-above {
  top: auto;
  bottom: 24px; /* 24px above */
}

/* Card footer (button, learn more, etc.) */
.tsf-cards-carousel__card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tsf-cards-carousel__card-btn {
  text-decoration: none;
  text-align: center;
  min-width: 50%;
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  padding: 18px 24px;
  border-radius: 30px !important;
  background-color: #000;
  cursor: pointer;
  line-height: 1.1;
}

body[data-button-style*="slightly_rounded"] .tsf-cards-carousel__card-btn {
  border-radius: 30px !important;
}

/* “Learn more” block (icon + label) */
.tsf-cards-carousel__card-learn_more {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.tsf-cards-carousel__card-learn_more {
  text-decoration: none !important;
}

.tsf-cards-carousel__card-learn_more:hover {
  cursor: pointer;
}

.tsf-cards-carousel__card-learn_more:focus {
  outline: none;
}

.tsf-cards-carousel__card-learn_more-icon {
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 4px;
}

.tsf-cards-carousel__card-learn_more:hover
  .tsf-cards-carousel__card-learn_more-icon {
  transform: scale(1.05);
  transition: transform 0.2s ease;
}

.tsf-cards-carousel__card-learn_more:active
  .tsf-cards-carousel__card-learn_more-icon {
  transform: scale(0.95);
  transition: transform 0.2s ease;
}

.tsf-cards-carousel__card-learn_more span {
  font-size: 12px;
  text-align: center;
  line-height: 1.1;
}

/* Footer block for dots, etc. */
.tsf-cards-carousel__footer {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 30px;
}

.tsf-cards-carousel__dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
}

.tsf-cards-carousel__dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background-color: #888888;
  cursor: pointer;
}

.tsf-cards-carousel__dot.selected {
  background-color: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

/* ===========================
   Form Modal
   =========================== */
.tsf-cards-carousel__modal {
  display: none;
  position: fixed;
  z-index: 999999;
  top: 0;
  left: 0;
  height: 100dvh;
  width: 100%;
  align-items: center;
  justify-content: center;
}

.tsf-cards-carousel__modal.open {
  display: flex;
}

.tsf-cards-carousel__modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
}

.tsf-cards-carousel__modal-content {
  position: relative;
  z-index: 9999999;
  background: #fff;
  padding: 24px;
  width: 90%;
  max-width: 500px;
  max-height: 90dvh;
  overflow: auto;
  border-radius: 16px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  transform: translateY(-20px);
  opacity: 0;
  transition: all 0.3s ease;
}

.tsf-cards-carousel__modal.open .tsf-cards-carousel__modal-content {
  transform: translateY(0);
  opacity: 1;
}

.tsf-cards-carousel__modal-close {
  position: absolute;
  top: 16px;
  right: 20px;
  font-size: 2rem;
  background: none;
  border: none;
  cursor: pointer;
  color: #333;
}

.tsf-cards-carousel__modal-close:hover {
  transform: scale(1.05);
  cursor: pointer;
}

.tsf-cards-carousel__modal-close:active {
  transform: scale(0.95);
}

.tsf-cards-carousel__modal h2 {
  margin-top: 24px;
  text-align: center;
}

.tsf-cards-carousel__modal .tsf-cards-carousel-form .wpforms-field-text,
.tsf-cards-carousel__modal .tsf-cards-carousel-form .wpforms-field {
  padding: 0 !important;
  margin: 24px !important;
  text-align: center;
  border-radius: 12px !important;
}

.tsf-cards-carousel__modal .tsf-cards-carousel-form .wpforms-field-limit-text {
  display: none !important;
}

.tsf-cards-carousel__modal .tsf-cards-carousel-form .wpforms-submit-container {
  text-align: center;
}

.tsf-cards-carousel__modal .tsf-cards-carousel-form .wpforms-field-text input,
.tsf-cards-carousel__modal .tsf-cards-carousel-form .wpforms-field input {
  text-align: center;
  border-radius: 12px !important;
  background-color: #f3f4f6;
}

body[data-form-submit="see-through"]
  .tsf-cards-carousel__modal
  .tsf-cards-carousel-form
  button {
  background-color: #000 !important;
  border-color: #000 !important;
  color: #fff !important;
  -webkit-border-radius: 12px !important;
  padding: 12px 30px !important;
}

body[data-form-submit="see-through"]
  .tsf-cards-carousel__modal
  .tsf-cards-carousel-form
  button:hover,
body[data-form-submit="see-through"]
  .tsf-cards-carousel__modal
  .tsf-cards-carousel-form
  button:active {
  background-color: #fff !important;
  background: #fff !important;
  color: #000 !important;
}

.tsf-cards-carousel-form__plan-input {
  display: none !important;
}

/* ===========================
   Responsive adjustments
   =========================== */

/* Up to 500px */
@media screen and (max-width: 500px) {
  .tsf-cards-carousel__card-title {
    font-size: 20px;
  }

  .tsf-cards-carousel__card-price {
    font-size: 22px;
  }

  .tsf-cards-carousel__card-content p {
    font-size: 16px;
  }

  .tsf-cards-carousel__card-btn {
    font-size: 14px;
    padding: 16px;
  }
}

/* Up to 400px */
@media screen and (max-width: 400px) {
  .tsf-cards-carousel__info-text {
    max-width: 90dvw;
  }

  .tsf-cards-carousel__card-header {
    flex-direction: column-reverse;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
  }

  .tsf-cards-carousel__card-header span {
    align-self: center;
  }
  .tsf-cards-carousel__card-title {
    margin-right: 6px !important;
    font-size: 20px !important;
  }
  .tsf-cards-carousel__card-header span {
    padding: 8px;
    font-size: 12px;
  }
  .tsf-cards-carousel__card-btn {
    padding: 12px 12px;
  }
  .tsf-cards-carousel__card-learn_more span {
    font-size: 10px;
  }
}

/* For screens wider than 700px, show 2 cards */
@media screen and (min-width: 700px) {
  .tsf-cards-carousel__inner.has-no-text .tsf-cards-carousel__title {
    margin-bottom: 48px !important;
  }

  .tsf-cards-carousel__inner {
    padding: 64px 32px;
  }

  .tsf-cards-carousel__title .tsf-cards-carousel__info-icon-wrapper {
    display: none;
  }

  .tsf-cards-carousel__text {
    display: block;
  }

  /* If carousel_text is empty, force title icon visibility at ALL screen sizes */
  .tsf-cards-carousel__inner.has-no-text
    .tsf-cards-carousel__title
    .tsf-cards-carousel__info-icon-wrapper {
    display: inline-block !important;
  }

  /* 2 cards per row */
  .tsf-cards-carousel__card-outer {
    min-width: calc(50% - 24px);
    padding-bottom: 48px;
  }

  /* first card */
  .tsf-cards-carousel__track > *:first-child {
    margin-left: 11px !important; /* Ensure first child doesn't overflow */
  }

  .tsf-cards-carousel__card-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .tsf-cards-carousel__card-type {
    display: none;
  }

  .tsf-cards-carousel__card-top-bar {
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
  }

  .tsf-cards-carousel__card-top-bar .tsf-cards-carousel__card-type {
    display: block;
  }

  .tsf-cards-carousel__card-price {
    /* optionally un-comment for extra spacing
    display: block;
    margin-bottom: 12px;
    */
  }

  .tsf-cards-carousel__card-helper-container {
    display: flex;
    position: relative;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
  }

  .tsf-cards-carousel__helper-title {
    font-size: 16px;
    margin: 0;
  }

  .tsf-cards-carousel__card-footer .tsf-cards-carousel__card-learn_more {
    display: none;
  }

  .tsf-cards-carousel__card-btn {
    margin: 0 auto;
  }
}

#tsf-element-7 {
  max-width: none !important;
}

@media screen and (min-width: 1100px) {
  /* 2 cards per row */
  .tsf-cards-carousel__card-outer {
    min-width: calc(33.333% - 24px);
  }
}
