/* ---------- Subscription plan badge + ? popover (cart drawer / cart page) ---------- */
.dsc-cart-drawer__item-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}

.dsc-cart-drawer__item-copy {
  min-width: 0;
  flex: 1 1 auto;
}

.dsc-cart-drawer__item-top .dsc-cart-drawer__item-name {
  margin-bottom: 0.15rem;
  color: var(--dsc-forest);
  font-weight: 700;
}

.dsc-cart-drawer__item-variant {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--dsc-sage);
}

.dsc-cart-drawer__item-top .dsc-cart-drawer__item-price {
  flex: 0 0 auto;
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--dsc-forest);
  line-height: 1.3;
}

.dsc-cart-drawer__item.is-subscription .aivory-cart-tag,
.dsc-cart-drawer__item.is-subscription .variation,
.dsc-cart-drawer__item.is-subscription dl.variation {
  display: none !important;
}

.dsc-cart-drawer__item-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
  margin-top: 0.55rem;
}

.dsc-sub-plan {
  position: relative;
  margin: 0.35rem 0 0;
}

.dsc-sub-plan__row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.dsc-sub-plan__badge {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: #ebe4f4;
  color: var(--dsc-forest);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.2;
}

.dsc-sub-plan__info {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #ebe4f4;
  color: var(--dsc-forest);
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.dsc-sub-plan__info:hover,
.dsc-sub-plan__info:focus-visible {
  background: var(--dsc-lavender);
  outline: none;
}

.dsc-sub-plan__info:focus-visible {
  box-shadow: 0 0 0 2px var(--dsc-forest);
}

.dsc-sub-plan__delivery {
  margin: 0.4rem 0 0;
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--dsc-forest);
  line-height: 1.35;
}

.dsc-sub-plan__panel {
  position: absolute;
  z-index: 40;
  left: 0;
  top: calc(100% + 0.45rem);
  width: min(17.5rem, calc(100vw - 3.5rem));
  padding: 1rem 1.05rem 1.05rem;
  border-radius: 14px;
  background: #ebe4f4;
  color: var(--dsc-forest);
  box-shadow: 0 14px 36px rgba(18, 63, 50, 0.16);
}

.dsc-sub-plan__panel[hidden] {
  display: none !important;
}

.dsc-sub-plan__panel-title {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--dsc-forest);
  line-height: 1.25;
}

.dsc-sub-plan__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.dsc-sub-plan__list li {
  position: relative;
  padding-left: 1.55rem;
  font-size: 0.84rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--dsc-forest);
}

.dsc-sub-plan__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.12rem;
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 999px;
  background: var(--dsc-forest);
  box-shadow: inset 0 0 0 1px var(--dsc-forest);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round' d='M3.5 8.2l2.8 2.8 6.2-6.2'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 0.7rem;
}

/* Cart page placement */
.woocommerce-cart-form .dsc-sub-plan {
  margin-top: 0.55rem;
  max-width: 22rem;
}

.woocommerce-cart-form .dsc-sub-plan__panel {
  position: relative;
  top: 0.55rem;
  left: 0;
  width: 100%;
  max-width: 22rem;
  box-shadow: none;
}

/* ---------- Checkout subscription banner + order review ---------- */
.dsc-sub-banner {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin: 0 0 1.25rem;
  padding: 0.9rem 1rem;
  border-radius: 10px;
  background: #f7e8d8;
  color: var(--dsc-forest);
  border: 1px solid rgba(18, 63, 50, 0.08);
}

.dsc-sub-banner__icon {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  margin-top: 0.1rem;
  border-radius: 999px;
  background: #c47a3a;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1;
}

.dsc-sub-banner__text {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.45;
  color: var(--dsc-forest);
}

.dsc-sub-banner__text strong {
  font-weight: 700;
}

.dsc-checkout-sub-line {
  display: block;
  margin: 0.35rem 0 0;
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.35;
  color: var(--dsc-sage, #5a7a6c);
}

.woocommerce-checkout-review-order-table .product-name .dsc-checkout-sub-line {
  color: var(--dsc-sage, #5a7a6c);
}

.dsc-sub-recurring-note-row th {
  padding: 0.85rem 0 0 !important;
  border-top: 1px solid rgba(18, 63, 50, 0.12);
  font-weight: inherit;
}

.dsc-sub-recurring-note {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--dsc-forest);
}

/* Hide plugin tags on checkout when our line is present */
.woocommerce-checkout .aivory-cart-tag {
  display: none !important;
}

@media (max-width: 768px) {
  .dsc-sub-banner {
    margin-bottom: 1rem;
    padding: 0.8rem 0.85rem;
  }

  .dsc-sub-banner__text {
    font-size: 0.84rem;
  }
}
