/* 420 Plugins — Checkout polish (scoped to .is-checkout) */

/* Minimal header: logo only; hide pill & right actions */
.is-checkout header.header{
  display:block !important;
  background:#0c0f11;
  border-bottom:1px solid rgba(255,255,255,.08);
}
.is-checkout header.header .header-inner{ align-items:center; padding-block:12px; }
.is-checkout header.header .brand-pill{ display:none !important; }
.is-checkout header.header .wp-block-group.is-content-justification-right{ display:none !important; }

/* Page content container */
.is-checkout .container{ width:min(900px,92vw); max-width:900px; }

/* Title spacing */
.is-checkout .entry-content > .container:first-child,
.is-checkout #checkout-title{ margin-top:20px !important; padding-top:0 !important; }

/* --- Card look (Cart + fieldsets ONLY; NOT the submit block) --- */
.is-checkout #edd_checkout_cart,
.is-checkout fieldset.edd-blocks-form{
  background:#0f1318;
  border:1px solid rgba(255,255,255,.08) !important;
  border-radius:14px !important;
  padding:20px;
  margin-block:18px;
  overflow:hidden;
}

/* Fieldset legends sit visually on the card edge */
.is-checkout fieldset.edd-blocks-form{ position:relative; margin-top:28px; }
.is-checkout fieldset.edd-blocks-form > legend{
  position:absolute; top:-14px; left:12px;
  margin:0; padding:0 6px;
  font-size:14px; letter-spacing:.02em; color:#cfd6df;
  background:#0c0f11;
}

/* Order card label */
.is-checkout #edd_checkout_cart{ position:relative; }
.is-checkout #edd_checkout_cart::before{
  content:"Order Details";
  position:absolute; top:-14px; left:12px;
  font-size:14px; letter-spacing:.02em; color:#cfd6df;
  padding:0 6px; background:#0c0f11;
}

/* Cart tidy + premium layout */
.is-checkout .edd-blocks-cart__row-header{ display:none !important; }
.is-checkout .edd-blocks-cart__row-item{
  display:grid; grid-template-columns:1fr auto; gap:12px; align-items:center;
}

/* Price & total “bubbles” (footer) */
.is-checkout .edd_cart_total{
  display:flex; justify-content:flex-end; align-items:center;
  gap:.5rem; text-align:right; font-weight:600;
}
.is-checkout .edd_cart_total::before{ content:none !important; } /* remove any “Today” label */
.is-checkout .edd_cart_total .edd_cart_amount{
  display:inline-block; padding:.25rem .6rem; border-radius:999px;
  background:rgba(255,255,255,.06); border:1px solid rgba(255,255,255,.25); font-weight:800;
}

/* Hide guest/login row + email field (we prefill earlier) */
.is-checkout .edd-blocks__checkout-forms{ display:none !important; }
.is-checkout #edd-edd_email-wrap{ display:none !important; }

/* Inputs (match Stripe element) */
.is-checkout .edd-input,
.is-checkout .edd-select{
  background:#151a21;
  border:1px solid rgba(255,255,255,.12);
  color:#e9eef5;
  border-radius:12px;
  padding:12px 14px;
  line-height:1.2;
}
.is-checkout .edd-input::placeholder{ color:#8c959c; }

/* Make sure First Name uses our colors without forcing placeholder to white */
.is-checkout #edd-edd_first-wrap .edd-input{
  color:#e9eef5 !important;   /* typed text color */
  caret-color:#e9eef5;
}
/* Consistent grey placeholder in both fields */
.is-checkout #edd_checkout_user_info .edd-input::placeholder{
  color:#8c959c; 
  opacity:1;                  /* Safari/Firefox ensure not translucent */
}

/* Autofill still shows as white text on dark bg */
.is-checkout input:-webkit-autofill,
.is-checkout input:-webkit-autofill:focus{
  -webkit-text-fill-color:#e9eef5 !important;
  box-shadow:0 0 0px 1000px #151a21 inset; /* keep dark field background */
}


/* Personal Info helper text removal + legend note */
.is-checkout .edd-description{ display:none !important; }
.is-checkout #edd_checkout_user_info > legend::after{
  content:" (To personalize your experience)";
  font-weight:400; color:#95a2b3;
}

/* Slightly shorter name fields */
#edd_checkout_user_info .edd-input{
  border-radius:12px !important;
  height:44px !important;
  padding:10px 14px !important;
  font-size:16px !important;
  line-height:1.2 !important;
}

/* Stripe element frame */
.is-checkout #edd-stripe-payment-element{
  background:#151a21;
  border:1px solid rgba(255,255,255,.12);
  border-radius:12px;
  padding:12px;
}

/* Payment Info: no card chrome */
.is-checkout #edd_cc_fields{
  border:0 !important;
  background:transparent !important;
  box-shadow:none !important;
  padding:0 !important;
}

/* Submit area (no card) */
.is-checkout #edd_purchase_submit{
  border:0 !important;
  background:none !important;
  box-shadow:none !important;
  padding:0 !important;
  margin-top:18px !important;
}

/* “Total Due Today …” — subtle bubble */
.is-checkout #edd_final_total_wrap{
  display:inline-block;
  background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.65);
  border-radius:12px;
  padding:10px 12px;
  margin:.5rem 0 1rem !important;
}

/* Purchase button */
#edd-purchase-button{
  appearance:none;
  background:linear-gradient(180deg,#9a4cff,#7b2ef5);
  color:#fff; border:0; border-radius:12px; padding:12px 16px; font-weight:700;
  cursor:pointer; transition:.2s transform,.25s box-shadow;
}
#edd-purchase-button:hover{ transform:translateY(-1px); box-shadow:0 14px 34px rgba(125,44,242,.30) }
#edd-purchase-button[disabled]{ opacity:.6; cursor:not-allowed; }

/* Footer spacing */
.is-checkout .footer{ margin-top:32px; }

/* misc */
#edd_secure_site_wrapper{ margin:0 0 .75rem 0; }

/* --- Cart price + remove layout --- */
.is-checkout .edd-blocks-cart__row-item .edd_cart_item_price{
  display:flex; align-items:center; justify-content:flex-end; gap:10px;
  padding:0 !important; background:transparent !important; border:0 !important;
}

/* The actual bubble (JS wraps the price text with this) */
.is-checkout .edd-price-badge{
  display:inline-block; padding:.25rem .6rem; border-radius:999px;
  background:rgba(255,255,255,.06); border:1px solid rgba(255,255,255,.25);
  font-weight:800; line-height:1;
}

/* Remove button to the RIGHT of the bubble */
.is-checkout .edd-blocks-cart__row-item .edd_cart_remove_item_btn{
  width:22px; height:22px; display:inline-block; margin-left:2px;
  background:none !important;
  color:#fff; opacity:1 !important;
  text-indent:-9999px; overflow:hidden;
  position:relative;
}

/* Outlined (not filled) trash icon so details are visible */
.is-checkout .edd-blocks-cart__row-item .edd_cart_remove_item_btn::before{
  content:"";
  position:absolute; inset:0;
  background-repeat:no-repeat; background-position:center; background-size:22px 22px;
  background-image:url("data:image/svg+xml;utf8,\
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'>\
<path d='M14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.166L18.16 19.673a2.25 2.25 0 01-2.244 2.077H8.084a2.25 2.25 0 01-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 00-3.478-.397m-12 .563c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 013.478-.398m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 00-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 00-7.5 0'/>\
</svg>");
  filter: drop-shadow(0 1px 0 rgba(0,0,0,.35));
}
.is-checkout .edd-blocks-cart__row-item .edd_cart_remove_item_btn:hover{ transform:translateY(-1px) }
