/* PLUXIX – Plan Cards UI (instead of WooCommerce variation dropdowns)
   Activates only when JS adds .rs-plan-cards-active to the variations form.
*/

.rs-plan-cards-wrap{
  margin: 0 0 18px;
}

.rs-plan-cards{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.rs-plan-card{
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  text-align: inherit;
  padding: 14px 14px 12px;
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(0,0,0,0.02), rgba(0,0,0,0.00));
  background-color: #fff;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
  position: relative;
  overflow: hidden;
}

.rs-plan-card:hover{
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(0,0,0,0.12);
}

.rs-plan-card:focus-visible{
  outline: 2px solid rgba(11,95,255,0.65);
  outline-offset: 2px;
}

.rs-plan-card__head{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  /* Reserve room for selection indicator / badges (absolute positioned) */
  padding-right: 38px;
}

.rtl .rs-plan-card__head{
  padding-right: 0;
  padding-left: 38px;
}

.rs-plan-card__name{
  font-size: 1.05em;
  font-weight: 700;
  line-height: 1.25;
  margin: 0;
}

.rs-plan-card__price{
  white-space: nowrap;
  font-weight: 700;
  font-size: 1.0em;
}

.rs-plan-card__price .price{
  margin: 0;
}

.rs-plan-card__meta{
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.rs-plan-chip{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.10);
  background: rgba(0,0,0,0.03);
  font-size: 12px;
  line-height: 1;
}

.rs-plan-chip__icon{
  font-size: 13px;
}

.rs-plan-card__desc{
  margin-top: 10px;
  font-size: 13px;
  opacity: 0.85;
}

.rs-plan-card__stock{
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  background: rgba(0,0,0,0.08);
  color: rgba(0,0,0,0.8);
}

.rtl .rs-plan-card__stock{
  right: auto;
  left: 10px;
}

.rs-plan-card.is-selected{
  border-color: #0b5fff;
  box-shadow: 0 16px 32px rgba(11,95,255,0.18);
}

.rs-plan-card.is-selected::after{
  content: '✓';
  position: absolute;
  top: 10px;
  right: 10px;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0b5fff;
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  box-shadow: 0 10px 18px rgba(11,95,255,0.25);
}

.rtl .rs-plan-card.is-selected::after{
  right: auto;
  left: 10px;
}

.rs-plan-card.is-selected .rs-plan-card__stock{
  display: none;
}

.rs-plan-card.is-disabled{
  opacity: 0.55;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.rs-plan-card.is-disabled:hover{
  transform: none;
  box-shadow: none;
}

form.variations_form.rs-plan-cards-active table.variations{
  display: none !important;
}

/* Theme compatibility: some themes output variations without a <table> */
form.variations_form.rs-plan-cards-active .variations{
  display: none !important;
}

/* Extra safety: hide the select wrappers if a theme prints them elsewhere */
form.variations_form.rs-plan-cards-active select,
form.variations_form.rs-plan-cards-active .variable-items-wrapper{
  /* keep JS-driven variation selection working while preventing UI duplication */
  visibility: hidden;
  height: 0;
  padding: 0;
  margin: 0;
  border: 0;
}

form.variations_form.rs-plan-cards-active .reset_variations{
  display: none !important;
}
