
.membership-wrapper{
  margin-top: 50px;
  margin-bottom: 50px;
  overflow: auto;
}
@media (min-width: 1023px) {
  .membership-toggle-grid {
    display: grid;
    grid-template-columns: 1fr 3fr;
  }
}
.membership-toggle {
  text-align: center;
  margin-bottom: 40px;
  grid-column-start: 2;
  grid-column-end: 5;
}
.membership-toggle button {
  padding: 15px 30px;
  border: 1px solid #ccc;
  background: white;
  color: black;
  font-weight: 600;
  font-size: 16px;
}

@media ( min-width: 620px ) {
  .membership-toggle button[data-plan="monthly"] {
    border-radius: 25px 0 0 25px;
  }
  .membership-toggle button[data-plan="annually"] {
    border-radius: 0 25px 25px 0;
  }
}

@media ( max-width: 619px ) {
  .membership-toggle button {
    display: block;
    margin: 0 auto;
    width: 500px;
    max-width: 100%;
  }
  .membership-toggle button[data-plan="monthly"] {
    border-radius: 25px 25px 0 0;
  }
  .membership-toggle button[data-plan="annually"] {
    border-radius: 0 0 25px 25px;
  }
}

.membership-toggle button.active {
  background: var( --wp--preset--color--purple-400 );
  color: #fff;
}
.membership-toggle button:not(.active):hover {
  background: var( --wp--preset--color--purple-100 );
  cursor: pointer;
}

/* Grid container */
.membership-grid {
  display: none;
  grid-template-columns: 1fr 1fr 1fr 1fr; /* Features + 3 plans */
  border-collapse: collapse;
}
.membership-grid.active { display: grid; }

/* Feature column */
.feature-cell {
  font-weight: 500;
  padding: 12px;
  border-bottom: 1px solid #eee;
  border-right: 1px solid #888; /* Right border */
  text-align: left;
}
span.highlight {
  color: #d9534f;
  font-weight: bold;
}

/* Plan headers */
.membership-grid .plan-header {
  display: block;
  padding: 20px 20px 70px;
  border-bottom: none;
  position: relative;
  background: #fff;
  border-right: 1px solid #888; /* Right border */
}

.plan-header .select-btn {
  position: absolute;
  max-width: 90%;
  left: 5%;
  bottom: 20px;
}

.plan-header img {
  padding-top: 15px;
}
.plan-header > h3 {
  font-size: 24px;
  font-weight: bold;
}
.plan-header.best-value {
  border-top: 2px solid #6b4aff;
  border-bottom: 1px solid #ddd;
}
.plan-header.best-value .badge {
  background: #6b4aff;
}
.plan-header.promo {
  border-top: 2px solid var( --wp--preset--color--pink-300 );
  border-bottom: 1px solid #ddd;
}
.plan-header.promo .badge {
  background: var( --wp--preset--color--pink-300 );
}
.plan-header .badge {
  position: absolute;
  width: 100%;
  top: 0;
  left: 0;
  color: #fff;
  padding: 5px 10px;
  font-size: 14px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.plan-terms {
  font-size: 14px;
  font-weight: normal;
  line-height: 1.6;
  margin-bottom: 20px;
}
.price {
  font-size: 18px;
}
.promo .price {
  color: var( --wp--preset--color--pink-300 );
  font-weight: bold;
}
.plan-terms .discount {
  color: white;
  background: var(--wp--preset--color--pink-300);
  display: inline-block;
  padding: 2px 7px;
  font-size: 14px;
  font-weight: bold;
  margin: 0 0 10px;
  text-transform: uppercase;
  border-radius: 2px;
}

/* I don't know why we have basic button CSS in this file.... */
.select-btn {
  width: 100%;
  cursor: default;
  display: block;
  padding: 12px 15px;
  border: none;
}
div.select-btn {
  background: #f3f3f3;
  color: #bbb;
}
a.select-btn {
  background: var( --wp--preset--color--purple-200 );
  color: #fff;
  text-decoration: none;
  width: 100%;
  cursor: pointer;
  font-weight: bold;
}
a.select-btn:hover {
  color: white;
  background: #3c1d87;
}


/* Cells for checks */
.membership-grid > div {
  display: flex;
  align-items: center;
  text-align: center;
  padding: 20px;
  border-bottom: 1px solid #ddd;
  border-right: 1px solid #888; /* Right border */
}

.membership-grid > div.best-value {
  border-left: 2px solid #6b4aff;
  border-right: 2px solid #6b4aff;
}
.membership-grid > div.promo {
  border-left: 2px solid var( --wp--preset--color--pink-300 );
  border-right: 2px solid var( --wp--preset--color--pink-300 );
}

.membership-grid.monthly.annually > div:nth-last-child(-n+3).best-value {
  border-bottom: 2px solid #6b4aff;
}
.membership-grid.monthly.annually > div:nth-last-child(-n+3).promo {
  border-bottom: 2px solid var( --wp--preset--color--pink-300 );
}

/* Target the parent div that contains the check div */
.membership-grid > div > .check {
  background: #3c1d87;
  color: var(--wp--preset--color--gray-100) !important;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  font-size: 25px;
  font-weight: bold;
  line-height: 24px;
  display: flex; /* Ensure the check div is centered within the parent div */
  justify-content: center;
  align-items: center;
  margin: 0 auto; /* Center align the check div within its parent */
}


/* Remove double borders on the last row and column */
.membership-grid > div:last-child {
  border-bottom: none;
}
.membership-grid > div.check:last-child {
  border-right: none;
}
.membership-grid .feature-cell:last-child {
  border-right: none;
}

/* Responsive */
@media (max-width: 1023px) {
  .membership-grid {
    grid-template-columns: 1fr 1fr; /* features + one plan per row */
  }
}
@media (max-width: 767px) {
  .membership-grid {
    grid-template-columns: 1fr 1fr 1fr 1fr; /* stack features + plans */
    /* min-width: 900px */
  }
}

/* Start Mobile Compare CSS */

/* Compare dropdown */
.compare-selector {
  text-align: center;
  margin: 20px 0;
}

.compare-selector>label{
  text-transform: uppercase;
  font-size: 12px;
}

@media (min-width: 1023px) {
  .compare-selector{
    display: none;
  }
}
.compare-selector select {
  padding: 10px 15px;
  border-radius: 6px;
  font-size: 16px;
  border: 1px solid #ccc;
}

/* Tablet & Mobile layout */
@media (max-width: 1023px) {

  .membership-grid {
    grid-template-columns: 1fr 1fr; /* Only two columns */
  }


  /* Show only selected plan columns */
  .membership-grid.show-plan-1 [data-plan="1"],
  .membership-grid.show-plan-2 [data-plan="2"],
  .membership-grid.show-plan-3 [data-plan="3"] {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: #fff;
    padding: 10px;
  }

  /* Show matching plan headers */
  .membership-grid.show-plan-1 .plan-header[data-plan="1"],
  .membership-grid.show-plan-2 .plan-header[data-plan="2"],
  .membership-grid.show-plan-3 .plan-header[data-plan="3"] {
    display: block;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 3;
    text-align: center;
    padding: 12px 10px;
  }

  /* Hide all plan columns + headers by default */
  .membership-grid [data-plan],
  .membership-grid .plan-header {
    display: none;
  }

  /* Make cells stack neatly */
  .membership-grid > div {
    text-align: center;
    border-right: 1px solid #ddd;
    font-weight: bold;
  }

  /* Replace checkmarks with text */
  .membership-grid > div[data-description]:before {
    content: attr(data-description);
    font-size: 16px;
    color: #333;
  }

  .membership-grid > div > .check {
    display: none; /* Hide the checkmark icon on small screens */
  }

  .feature-cell{
    display: none !important;
  }

  .membership-grid [data-plan="2"] {
    border-right: none !important;
  }
}
