/* ========= 420 Plugins — Account Page ========= */

/* 1) Hide “Account” button on this page */
.is-account .btn-account { display: none !important; }

/* Page frame */
.account-wrap{
  max-width: 920px;
  margin: 0 auto;
  padding: 24px 0 80px;
}

/* Top row */
.account-top{
  position: relative;
  padding-top: 44px; /* room for the top-right actions */
  margin-bottom: 28px; /* 5) more space before the main card */
}

.account-top .greeting{
  font-size: 20px;           /* 6) larger */
  font-weight: 700;
  color: #f1f1f7;
  letter-spacing: .2px;
}

.account-top .top-actions{
  position: absolute;        /* pinned under site header */
  right: 0;
  top: -6px;
  display: flex;
  gap: 10px;
}

/* Grid that holds product card(s) */
.account-grid{
  display: grid;
  gap: 18px;
  margin-top: 4px;
}

/* ===== Main product card (greyscale) ===== */
.card.ra-product{
  background: #0b0c10; /* darker neutral */
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 14px;
  box-shadow: 0 12px 28px rgba(0,0,0,0.5);
  overflow: hidden;
}

/* Header — centered, price underneath (1 & 2) */
.ra-product .ra-head{
  padding: 18px 18px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  color: #ececf2;
  background:
    radial-gradient(1100px 420px at -20% -80%, rgba(255,255,255,0.035) 0%, rgba(0,0,0,0) 60%),
    linear-gradient(180deg, rgba(255,255,255,0.04), rgba(0,0,0,0.02)),
    #0f1015;                     /* neutral grey, no indigo */
  border-bottom: 1px solid rgba(255,255,255,0.10);
}
.ra-product .ra-head h2{
  margin: 0;
  font-size: 18px;              /* 6) larger */
  letter-spacing: .25px;
}
.ra-product .ra-head .sub{
  opacity: .9;
  font-size: 13px;              /* 6) larger */
}

/* ===== Sub-cards ===== */
.ra-sections{
  display: grid;
  gap: 16px;
  padding: 16px;
}
.ra-section{
  background: #15161d;                                /* lighter than main to pop */
  border: 1px solid rgba(255,255,255,0.16);           /* stronger border */
  border-radius: 12px;
  padding: 14px 14px 12px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.04),
    0 14px 28px rgba(0,0,0,0.35);                     /* deeper drop shadow */
}
.ra-section h3{
  margin: 0 0 10px;
  font-size: 14px;                                    /* 6) larger */
  font-weight: 800;
  color: #f0f0f6;
  letter-spacing: .3px;
}

/* Key/Value lists */
.kv{
  display: grid;
  grid-template-columns: 160px 1fr;                   /* a little more width */
  row-gap: 9px;
  column-gap: 16px;
  margin: 0 0 12px;
}
.kv dt{
  opacity: .75;
  color: #cfd2dc;
  font-size: 13px;                                    /* 6) larger */
}
.kv dd{
  margin: 0;
  color: #ffffff;
  font-size: 14px;                                    /* 6) larger */
}

/* Actions (buttons) */
.actions{ display:flex; flex-wrap:wrap; gap:8px; }
.pill{
  display:inline-flex; align-items:center; justify-content:center;
  height: 32px; padding: 0 14px;                      /* 6) taller */
  font-size: 13px; font-weight: 700; letter-spacing:.2px;
  border-radius: 999px; border: 1px solid rgba(180,140,255,.25);
  background: rgba(160,120,255,.12);
  color:#efe6ff; text-decoration:none;
  transition: filter .15s ease, transform .02s ease;
}
.pill:hover{ filter: brightness(1.08); }
.pill:active{ transform: translateY(1px); }
.pill.brand{ border-color: rgba(196,151,255,.35); background: rgba(110,70,200,.22); }
.pill.danger{ border-color: rgba(255,86,110,.4); background: rgba(255,66,98,.16); color:#ffd6de; }
.pill.warn{ border-color: rgba(255,214,102,.4); background: rgba(255,214,102,.16); color:#fff3ce; }

/* Badges — status colors */
.badge{
  display:inline-flex; align-items:center; justify-content:center;
  height: 24px; padding: 0 10px; border-radius: 999px;
  font-size: 12px; font-weight: 800; letter-spacing:.3px;
  border:1px solid transparent;
}
.badge.ok{      background:#0f3b22;  border-color:#1dd17233; color:#caffde; }
.badge.warn{    background:#463a05;  border-color:#ffd85a55; color:#ffeaa6; }
.badge.danger{  background:#4a0b18;  border-color:#ff6b8d55; color:#ffd0da; }
.badge.muted{   background:#23242f;  border-color:#ffffff22; color:#d5d7de; opacity:.85; }

/* License row */
.lic input[type="text"]{
  pointer-events:none;
  border:1px solid rgba(255,255,255,.20);
  background:#1b1c22;
  color:#f3f4f8;
  font-weight:800; letter-spacing:.25px;
  border-radius: 999px;
  height: 34px;
  padding: 0 12px;
  /* ↓ tweak these two */
  min-width: max(320px, 36ch);
  padding-right: 16px;

  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
}

.lic .toast{
  position:absolute; left:50%; transform:translateX(-50%) translateY(-8px);
  bottom:-28px;
  background:#121318; color:#f6f6fb;
  border:1px solid rgba(255,255,255,.18);
  border-radius:10px; padding:6px 10px;
  font-size:12px; font-weight:800;
  box-shadow:0 10px 20px rgba(0,0,0,.5);
  opacity:0; pointer-events:none; transition:opacity .15s ease, transform .15s ease;
}
.lic .toast.show{ opacity:1; transform:translateX(-50%) translateY(0); }

/* License row container: position for the toast, line things up */
.lic{
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* Downloads list */
.pill-list{ display:flex; flex-wrap:wrap; gap:8px; padding:0; margin:0; list-style:none; }

/* Footer spacing */
.footer{ margin-top: 54px; }

/* Small screens */
@media (max-width: 600px){
  .kv{ grid-template-columns: 130px 1fr; }
  .account-top .top-actions{ position: static; margin-bottom: 10px; }
  .account-top{ padding-top: 0; }
}

/* --- Account sub-pages (when ?action= is present) --- */
body.is-account.has-action .top-actions { display: none; }
body.is-account.has-action .account-grid { grid-template-columns: 1fr; }
body.is-account.has-action .account-wrap { max-width: 900px; margin: 0 auto; }

/* Only show the FIRST .ra-source section on subpages (the one EDD renders for the action) */
body.is-account.has-action .account-grid .card.ra-source { display: none; }
body.is-account.has-action .account-grid .card.ra-source:first-of-type { display: block; }

/* On the main Account page, keep native EDD markup hidden behind our custom panel */
body.is-account:not(.has-action) .ra-source { display: none; }

/* Ensure “Update account details” shows on the main dashboard */
body.is-account:not(.has-action) .account-top .top-actions { display: flex; }
body.is-account:has(.account-grid .ra-product) .account-top .top-actions { display: flex; }

/* Subpage niceties */
.subpage-back { margin-top: 10px; }
.subpage-back .btn.ghost { padding: 8px 12px; border-radius: 999px; }

/* Payment update layout */
#edd-recurring-form { max-width: 520px; margin: 18px auto 0; }
#edd-recurring-form #edd-recurring-stripe-payment-element { margin-top: 10px; }
#edd-recurring-update-submit { margin-top: 14px; }

/* Make EDD/Stripe update form fields readable on dark */
#edd-recurring-form .ra-input,
#edd-recurring-form input[type="text"],
#edd-recurring-form input[type="email"],
#edd-recurring-form input[type="tel"],
#edd-recurring-form select {
  background:#1b1c22 !important;
  color:#f3f4f8 !important;
  border:1px solid rgba(255,255,255,.20) !important;
  height:40px; border-radius:10px; padding:0 12px;
}

/* Submit button already gets .pill.brand in JS; just ensure spacing */
#edd-recurring-update-submit.pill { height:36px; }

/* Transactions table */
.ra-table {
  width:100%;
  border-collapse:separate; border-spacing:0;
  margin-top:14px;
}
.ra-table thead th{
  text-align:left; font-weight:800; font-size:14px;
  padding:10px 12px; color:#e9eaf2;
  border-bottom:1px solid rgba(255,255,255,.12);
}
.ra-table tbody td{
  padding:10px 12px; font-size:14px; border-bottom:1px solid rgba(255,255,255,.08);
}
.ra-table tbody tr:last-child td{ border-bottom:0; }

/* Only hide hidden .ra-inputs, not the submit */
input[type="hidden"].ra-input { display: none; }
#edd-recurring-update-submit { display:inline-flex; align-items:center; gap:.5rem; }

/* Breathing room around the Stripe element + keep footer off it */
#edd-recurring-stripe-payment-element { margin: 14px 0 18px; }
.account-wrap { padding-bottom: 80px; } /* space before footer */
.footer { margin-top: 32px; }           /* extra separation */

/* Safeguard: never force input styles onto Stripe's Payment Element */
#edd-recurring-stripe-payment-element,
#edd-recurring-stripe-payment-element .StripeElement {
  height: auto !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
}
/* Brighten Stripe iframe a touch */
#edd-recurring-stripe-payment-element iframe { filter: contrast(1.06) brightness(1.12); }

/* =========================
   Logged-out /account/ → Login card
   ========================= */
body.is-account .account-auth{
  display:flex;
  justify-content:center;
  align-items:flex-start;
  padding:9vh 0 11vh;
}
body.is-account .account-auth .edd_form{ width:min(560px,94vw); }
body.is-account .account-auth fieldset{
  margin:0; background:var(--card); border:1px solid #293037; border-radius:18px;
  padding:26px 22px; box-shadow:0 18px 50px rgba(0,0,0,.45), 0 0 0 1px rgba(255,255,255,.03) inset;
}
body.is-account .account-auth legend{
  margin:0 0 6px; padding:0; font-weight:900; font-size:clamp(1.4rem,2.4vw,1.8rem);
  letter-spacing:.2px; color:#fff; text-align:center;
}
body.is-account .account-auth .edd-login-username,
body.is-account .account-auth .edd-login-password,
body.is-account .account-auth .edd-login-remember,
body.is-account .account-auth .edd-login-submit,
body.is-account .account-auth .edd-lost-password{ margin:12px 0; }
body.is-account .account-auth label{
  display:block; margin:0 0 6px; color:#c9d3db; font-weight:700; letter-spacing:.2px;
}
body.is-account .account-auth .edd-input{
  width:100%; border:1px solid #2a2f34; background:var(--card-2);
  color:var(--text); outline:none; border-radius:12px; padding:14px 14px; font-size:1rem;
  transition:border-color .2s, box-shadow .2s, background .2s;
}
body.is-account .account-auth .edd-input::placeholder{ color:#9aa4ac; }
body.is-account .account-auth .edd-input:focus{
  border-color:var(--brand-2);
  box-shadow:0 0 0 2px color-mix(in srgb, var(--brand-2) 35%, transparent),
             0 0 26px color-mix(in srgb, var(--brand-2) 35%, transparent);
  background:#171c20;
}
body.is-account .account-auth .edd-login-remember label{
  display:flex; align-items:center; gap:8px; color:#aeb6bd; font-weight:600;
}
body.is-account .account-auth #rememberme{ accent-color:#b14fff; }
body.is-account .account-auth .edd-submit{
  width:100%; appearance:none; border:0; border-radius:999px; padding:.95rem 1.2rem;
  font-weight:900; letter-spacing:.2px; color:#fff; cursor:pointer;
  background:linear-gradient(90deg,#b14fff 0%,#00e0c6 100%);
  box-shadow:0 10px 28px rgba(177,79,255,.25), 0 0 0 1px rgba(255,255,255,.04) inset;
  transition:transform .12s ease, box-shadow .2s ease, filter .2s ease;
}
body.is-account .account-auth .edd-submit:hover{
  transform:translateY(-1px); filter:brightness(1.06);
  box-shadow:0 16px 38px rgba(177,79,255,.32), 0 0 0 1px rgba(255,255,255,.05) inset;
}
body.is-account .account-auth .edd-submit:active{ transform:translateY(0); }
body.is-account .account-auth .edd-lost-password{ text-align:center; margin-top:6px; }
body.is-account .account-auth .edd-lost-password a{
  color:#c9d3db; text-decoration:none; border-bottom:1px dotted #47515a;
}
body.is-account .account-auth .edd-lost-password a:hover{ color:#fff; border-bottom-color:#b14fff; }
body.is-account .header{ box-shadow:none; }
body.is-account .brand-pill{ opacity:.85; }
@media (max-width:520px){
  body.is-account .account-auth fieldset{ padding:22px 16px; border-radius:16px; }
  body.is-account .account-auth legend{ font-size:1.45rem; }
}

/* License key – bigger, colored, monospace */
:root{ --key-accent:#8fd1ff; }
.lic input[type="text"], .edd_sl_license_key{
  font: 800 18px/1.1 ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--key-accent);
  letter-spacing: .6px;
  background:#0b0e12;
  border-color: rgba(173,216,255,.35);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
}
.lic input[type="text"]::selection, .edd_sl_license_key::selection{
  background: rgba(173,216,255,.22); color:#fff;
}
body.is-account .lic input[type="text"], body.is-account .edd_sl_license_key{ font-size: 20px; }

/* ========= Account Details (/account/details/) ========= */

/* 2) Hide “Account” button in header on this page */
body.is-profile .btn-account { display: none !important; }

/* Page frame & card to match brand */
body.is-profile .entry-content .card{
  max-width: 860px; margin: 0 auto;
  background: #0b0c10; border: 1px solid rgba(255,255,255,.12);
  border-radius: 14px; box-shadow: 0 12px 28px rgba(0,0,0,.5);
  overflow: hidden;
}
body.is-profile .entry-content .card > header{
  padding: 18px 18px 10px; border-bottom: 1px solid rgba(255,255,255,.10);
}
body.is-profile .entry-content .card > header h2{ margin:0; font-size:18px; }
body.is-profile .entry-content .card > header .muted{ margin:6px 0 0; opacity:.85; }
body.is-profile .entry-content .card-body{ padding:16px; }

/* 1) Back button — placed OUTSIDE the card */
.subpage-back{ margin:10px 0 14px; }
.subpage-back .btn.ghost{ padding:8px 12px; border-radius:999px; }

/* Form layout */
body.is-profile #edd_profile_editor_form{ display:grid; gap:16px; }

/* Fieldset “cards” */
body.is-profile fieldset{
  background:#15161d; border:1px solid rgba(255,255,255,.16);
  border-radius:12px; padding:14px;
}
body.is-profile legend{
  margin:0 0 10px; font-size:14px; font-weight:800; color:#f0f0f6; letter-spacing:.3px;
}

/* Inputs on-brand (email text is white here) */
body.is-profile .edd-input,
body.is-profile .edd-select,
body.is-profile input[type="text"],
body.is-profile input[type="email"],
body.is-profile input[type="password"],
body.is-profile select{
  width:100%;
  border:1px solid rgba(255,255,255,.20);
  background:#1b1c22;
  color:#f3f4f8;
  height:40px;
  border-radius:10px;
  padding:0 12px;
}

/* Personal Info grid */
body.is-profile #edd_profile_personal_fieldset{
  display:grid; grid-template-columns: 1fr 1fr; gap:12px;
}
body.is-profile #edd_profile_personal_fieldset legend{ grid-column:1 / -1; }
body.is-profile #edd_profile_first_name_wrap,
body.is-profile #edd_profile_last_name_wrap,
body.is-profile #edd_profile_primary_email_wrap{ display:flex; flex-direction:column; }
body.is-profile #edd_profile_primary_email_wrap{ grid-column:1 / -1; }

/* Password grid */
body.is-profile #edd_profile_password_fieldset{
  display:grid; grid-template-columns: 1fr 1fr; gap:12px;
}
body.is-profile #edd_profile_password_fieldset legend{ grid-column:1 / -1; }
body.is-profile #edd_profile_password_wrap,
body.is-profile #edd_profile_confirm_password_wrap{ display:flex; flex-direction:column; }

/* Per-section Save buttons */
body.is-profile .edd_form .section-actions{ margin-top: 10px; }
body.is-profile .edd_form .section-actions .pill{
  display:inline-flex; align-items:center; justify-content:center; gap:.5rem;
  height:36px; padding:0 16px; font-size:13px; font-weight:800; letter-spacing:.2px;
}
body.is-profile .edd_form .section-actions .pill.brand{
  border:1px solid rgba(196,151,255,.35);
  background: rgba(110,70,200,.22); color:#efe6ff;
}

/* Hide EDD’s single footer submit; we use per-section buttons */
body.is-profile #edd_profile_submit_fieldset{ display:none; }

/* 3–4) Hard-hide removed fields (defense in depth) */
body.is-profile #edd_profile_display_name_wrap,
body.is-profile #edd_profile_address_fieldset{ display:none !important; }

/* Mobile */
@media (max-width: 600px){
  body.is-profile #edd_profile_personal_fieldset,
  body.is-profile #edd_profile_password_fieldset{ grid-template-columns: 1fr; }
}

/* Force white text for Primary Email (and keep autofill readable) */
body.is-profile #edd_profile_primary_email_wrap input#edd_email{
  color:#fff !important;           /* main text */
  -webkit-text-fill-color:#fff;    /* Safari */
  caret-color:#fff;
}
body.is-profile #edd_profile_primary_email_wrap input#edd_email::placeholder{
  color:#cfd2dc; opacity:1;         /* nice placeholder on dark */
}
/* Chrome autofill: prevent black text on yellow */
body.is-profile #edd_profile_primary_email_wrap input#edd_email:-webkit-autofill{
  -webkit-text-fill-color:#fff !important;
  box-shadow:0 0 0 1000px #1b1c22 inset; /* match our input bg */
  transition:background-color 9999s ease-out 0s; /* hide flash */
}

