/* ******************************
* TABLE OF CONTENTS
* 1. Base Styles & Variables
* 2. Interactive Components
*    - Accordion
*    - Buttons
*    - Product Selection
* 3. Cards & Selection States
* 4. Carousel Components
*    - Layout
*    - Slide Visibility
*    - Card
*    - Card Badge
*    - Navigation
*    - Pagination
* 5. Progress Indicator
* 6. Cheaper in the long run comparison graph
****************************** */
/* ******************************
* 1. Base Styles & Variables
****************************** */
.selection-display {
  font-size: 1rem;
  line-height: 1.5;
  color: #749c72;
}

.selection-display strong {
  color: #c7524a;
  font-weight: 600;
}

.ring-custom-red {
  --tw-ring-color: #fb9d92;
}

/* ******************************
* 2. Interactive Components
****************************** */
/* Accordion */
.accordion-content {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.3s ease-out;
}

.accordion-icon {
  transform: rotate(180deg);
  transition: all 0.3s ease-out;
}

.accordion-button:not([aria-selected="true"]) .accordion-icon {
  transform: rotate(180deg);
}

.accordion-button[aria-expanded="true"] .accordion-icon {
  transform: rotate(360deg);
}

.accordion-button[aria-expanded="true"] + .accordion-content {
  max-height: 2000px;
}

/* Buttons */
@keyframes popIn {
  0% {
    transform: translate(0, -50%) scale(0) rotate(-45deg);
    opacity: 0;
  }

  40% {
    transform: translate(0, -50%) scale(1.4) rotate(5deg);
  }

  60% {
    transform: translate(0, -50%) scale(0.9) rotate(0deg);
  }

  80% {
    transform: translate(0, -50%) scale(1.1) rotate(0deg);
  }

  100% {
    transform: translate(0, -50%) scale(1) rotate(0deg);
    opacity: 1;
  }
}

.tick-icon {
  display: none;
  width: 16px !important;
  height: 16px !important;
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  transform-origin: center;
}

.button-inner {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
  transition: padding 0.2s ease-out;
}

.animated-button.button-clicked {
  background-color: #749c72 !important;
  border-color: #45a049 !important;
  color: white !important;
}

.animated-button.button-clicked .tick-icon {
  display: block;
  animation: popIn 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

.animated-button.button-clicked .button-inner {
  padding-left: 1rem;
}

/* Product Selection */
[role="tab"][aria-selected="true"] {
  border-color: #749c72 !important;
}

/* ******************************
* 3. Cards & Selection States
****************************** */
/* Trying new pseudo-effect */
.card {
  position: relative !important;
}

.card.selected {
  background: #f5fbf4 !important;
  box-shadow: inset 0 0 0 2px #749c72 !important;
}

.button-selected {
  background-color: #749c72 !important;
  border-color: #749c72 !important;
  color: white !important;
}

.button-selected .button-inner svg {
  display: inline-block !important;
}

/* ******************************
* 4. Carousel Components
****************************** */
/* Layout */
.carousel {
  max-width: 1080px;
  margin: 0 auto;
}

@media (min-width: 1280px) {
  .carousel {
    max-width: 960px;
  }
}

@media (min-width: 1536px) {
  .carousel {
    max-width: 1080px;
  }
}

main > section > form {
  isolation: isolate;
}

/* Slide Visibility */
.swiper-slide,
.swiper-slide-visible {
  opacity: 0;
  z-index: 0 !important;
  pointer-events: none !important;
}

.swiper-slide-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  z-index: 2 !important;
  pointer-events: auto !important;
}

.swiper-slide-prev,
.swiper-slide-next {
  opacity: 0.5;
  visibility: visible;
  z-index: 1 !important;
}

/* Card */
.card {
  width: 280px;
  position: relative;
}

@media (min-width: 360px) {
  .card {
    width: 320px;
  }
}

@media (min-width: 400px) {
  .card {
    width: 360px;
  }
}

@media (min-width: 768px) {
  .card {
    width: 410px;
  }
}

@media (min-width: 1280px) {
  .card {
    width: 364px;
  }
}

@media (min-width: 1536px) {
  .card {
    width: 410px;
  }
}

/* Card Badge */
.card--badge {
  position: absolute;
  top: -12px;
  left: 0;
  right: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  z-index: 10;
  pointer-events: none;
}

.card--badge span {
  flex: 0 0 auto;
  background-color: #ef4444;
  border-radius: 0.5rem !important;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 2em;
  padding: 0 0.75rem;
  color: white;
  pointer-events: auto;
}

.card--badge .premium {
  flex: 0 0 auto;
  background-color: #ebb155;
  border-radius: 0.5rem !important;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 2em;
  padding: 0 0.75rem;
  color: white;
  pointer-events: auto;
}

@media (max-width: 480px) {
  .card--badge span {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
}

/* Navigation */
.swiper-button-next,
.swiper-button-prev {
  position: absolute;
  top: 0 !important;
  bottom: 0 !important;
  width: calc((100% - 440px) / 2) !important;
  min-width: 32px !important;
  height: 100% !important;
  transition: background-color 0.2s ease;
  margin: 0;
  top: calc(50% - 6px) !important;

  /* Adjust for pagination height */
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.swiper-button-next.swiper-button-disabled,
.swiper-button-prev.swiper-button-disabled {
  background-color: #bdcfbb;
  opacity: 1;
  pointer-events: auto;
  cursor: not-allowed;
}

.swiper-button-next::after,
.swiper-button-prev::after {
  display: none;
}

.swiper-button-next > div > svg {
  position: relative;
  right: -1px;
}

.swiper-button-prev > div > svg {
  position: relative;
  left: -1px;
}

/* Pagination */
.swiper-pagination {
  position: relative !important;
  margin-top: 0.5rem !important;
  bottom: auto !important;
  top: auto !important;
  width: 100% !important;
}

.swiper-pagination-bullet {
  width: 8px !important;
  height: 8px !important;
  margin: 0 6px !important;
  background: #d1d1d1 !important;
  opacity: 1 !important;
  transition: background-color 0.2s ease;
}

.swiper-pagination-bullet-active {
  background: #749c72 !important;
  opacity: 1 !important;
}

/* ******************************
* 5. Progress Indicator
****************************** */
ol[data-pg-name="steps-indicator"] {
  /* specifically target divs */
  position: relative;
  gap: 0.25rem;
}

@media (min-width: 481px) {
  ol[data-pg-name="steps-indicator"] {
    gap: 1rem;
  }
}

ol[data-pg-name="steps-indicator"]::before {
  position: absolute;
  top: 12px;
  left: 12px;
  content: "";
  height: 1px;
  width: calc(100% - 24px);
  background-color: #d6e1d5;
}

/* ******************************
* 6. Cheaper in the long run comparison graph
****************************** */
.bar-fill {
  transform: scaleX(0);
  transition: transform 1s ease-out;
}

.bar-text {
  opacity: 0;
  transition: opacity 0.3s ease-out;
  transition-delay: 0.7s;
}

.animate .bar-fill {
  transform: scaleX(1);
}

.animate .bar-text {
  opacity: 1;
}

/* ******************************
* STYLING FOR CHOOSE PP SECTION
****************************** */
#pp-select {
  top: 0%;
  left: 10%;
}

.title-sel-colour {
  margin-top: -10px;
}

@media (max-width: 375px) {
  .title-sel-colour {
    margin-top: 0;
  }
}

@media (max-width: 640px) {
  #pp-select {
    left: 0;
    width: 40%;
  }
}

.nav-placeholder {
  background-color: #ffffff;
  height: 109px;
}

.header-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.header-title {
  font-size: 30px;
}

.header-button {
  width: 133px;
  height: 36px;
}

.content-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  /* padding: 20px; */
}

.image-container {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: baseline;
  flex-wrap: wrap;
  column-gap: 20px;
}

.product-container {
  max-width: 800px;
  flex: 1;
}

.pp-product-image {
  width: 88%;
  margin: 0 auto;
}

@media (max-width: 1200px) {
  .image-container {
    flex-direction: column !important;
    gap: 75px;
  }

  .product-container {
    width: 100% !important;
    max-width: 600px !important;
    margin: 0 auto !important;
  }

  .go-image {
    content: url("../assets/go-mobile.webp");
  }

  .title-sel-colour {
    max-width: 100%;
  }

  .pp-product-image {
    width: 100%;
  }
}


/* ******************************
* BASIC MODAL STYLING
****************************** */
#pp-original {
      padding-top: 7rem;
}

@media (max-width: 400px) {
  #pp-original {
    padding-top: 0;
}
}