/* EasyCMM checkout - HIM design system: true-black scaffold, orange #FF9800
   primary accent, Roboto type. No external CSS framework; the surface is small
   enough to hand-roll. Variable names are kept stable so every checkout-flow
   page (login / account / checkout / success / register) recolors at once. */

@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700;800;900&family=Material+Symbols+Rounded:opsz,wght,FILL,GRAD@20..48,400,0..1,0&display=swap');

:root {
  --bg:        #0E1A2B;                                          /* scaffold deep navy       */
  --bg-card:   linear-gradient(180deg, #16263D 0%, #1B2E49 100%);/* card gradient (navy)     */
  --bg-card-2: #243453;                                          /* hover surface (navy)     */
  --text:      #EDEDED;                                          /* body text                */
  --text-dim:  #9E9E9E;                                          /* grey-300                 */
  --accent:    #FF9800;                                          /* orange (primary)         */
  --accent-hot:#FF9800;                                          /* orange (primary, kept)   */
  --accent-hover:#FFA726;                                        /* bright orange (hover)    */
  --line:      #2C3E5C;                                          /* navy-grey borders        */
  --danger:    #E53935;
  --ok:        #4CAF50;

  /* Extra HIM tokens used by the register page / shared inputs */
  --hairline:  rgba(255,255,255,0.12);
  --input-fill: rgba(255,255,255,0.08);
  --placeholder: rgba(255,255,255,0.60);
  --orange-ring: 0 0 0 3px rgba(255,152,0,0.15);
  --orange-glow: 0 0 0 1px rgba(255,152,0,0.45), 0 0 24px rgba(255,152,0,0.18);
  --grey-200:  #BDBDBD;
  --grey-400:  #7A7A7A;
  --grey-500:  #555555;
}

/* Hidden helper — used by register.js (regForm.classList.add('hidden')) and
   several page scripts. Define it once, globally, so the toggle is reliable. */
.hidden { display: none !important; }

/* Material Symbols glyph helper (font loaded via the @import above). */
.mi {
  font-family: 'Material Symbols Rounded';
  font-weight: normal; font-style: normal;
  line-height: 1; letter-spacing: normal; text-transform: none;
  display: inline-block; white-space: nowrap; word-wrap: normal; direction: ltr;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", Oxygen, Ubuntu, sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

/* Black scaffold with a faint top-center orange glow (HIM). Fixed so it stays
   put behind long forms like the registration page. */
body {
  min-height: 100vh;
  background:
    radial-gradient(1200px 520px at 50% -10%, rgba(255,152,0,0.08), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}

a { color: var(--accent); text-decoration: none; font-weight: 600; }
a:hover { text-decoration: underline; }

header {
  min-height: 64px;
  padding: 0 32px;
  background: rgba(0,0,0,0.6);
  border-bottom: 1px solid var(--hairline);
  display: flex;
  align-items: center;
  gap: 16px;
}

header .logo {
  font-size: 24px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.4px;
}

header .logo .accent { color: var(--accent-hot); }

/* Shared HIM form-control base. Page-level scoped rules may still override
   (e.g. the registration page's .ec-input), but anything that doesn't gets a
   consistent rounded dark field with an orange focus ring. */
input, select, textarea {
  font-family: inherit;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--orange-ring);
}

main {
  max-width: 1000px;
  margin: 0 auto;
  padding: 32px;
}

h1 {
  font-size: 26px;
  font-weight: 600;
  margin: 0 0 8px;
}

p.lead {
  color: var(--text-dim);
  margin: 0 0 32px;
  font-size: 15px;
}

.plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.plan {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  cursor: pointer;
  transition: transform 0.1s, border-color 0.1s;
  position: relative;
}

.plan:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.plan.selected {
  border-color: var(--accent-hot);
  background: var(--bg-card-2);
  box-shadow: 0 0 0 1px var(--accent-hot);
}

.plan h3 {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.plan .duration {
  color: var(--text-dim);
  font-size: 13px;
  margin: 0 0 12px;
}

.plan .price {
  font-size: 28px;
  font-weight: 700;
  color: var(--accent-hot);
}

.plan .price .currency {
  font-size: 16px;
  vertical-align: top;
  margin-right: 2px;
  color: var(--text-dim);
}

/* Featured plan (e.g. the 2-day rental): larger, emphasized price. */
.plan.plan-featured .price { font-size: 44px; }
.plan.plan-featured .price .currency { font-size: 22px; }

.plan.selected::after {
  content: "✓";
  position: absolute;
  top: 12px;
  right: 12px;
  color: var(--accent-hot);
  font-weight: 700;
}

#paypal-section {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
  margin-top: 16px;
  min-height: 80px;
}

#paypal-section.hidden { display: none; }

#paypal-section h2 {
  margin: 0 0 8px;
  font-size: 18px;
}

#paypal-section .summary {
  color: var(--text-dim);
  margin: 0 0 16px;
}

#paypal-buttons {
  /* PayPal renders its iframe here. Light background is friendlier to the
     PayPal-yellow button than the slate dark would be. */
  background: #f6f7f8;
  padding: 12px;
  border-radius: 4px;
}

.status-line {
  color: var(--text-dim);
  font-size: 13px;
  margin-top: 12px;
}

.status-line.error { color: var(--danger); }
.status-line.ok { color: var(--ok); }

footer {
  border-top: 1px solid var(--hairline);
  padding: 22px 32px;
  color: var(--grey-400);
  font-size: 13px;
  text-align: center;
}

/* Success page */
.success-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 32px;
  text-align: center;
  margin-top: 24px;
}

.success-card h1 { color: var(--ok); margin-bottom: 16px; }

.code-display {
  font-family: "Cascadia Code", Consolas, "Courier New", monospace;
  font-size: 28px;
  font-weight: 700;
  padding: 16px 24px;
  background: var(--bg);
  border: 1px solid var(--accent);
  border-radius: 6px;
  display: inline-block;
  margin: 16px 0;
  user-select: all;
  letter-spacing: 1px;
}

.code-display.pending {
  color: var(--text-dim);
  border-color: var(--line);
  font-size: 18px;
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0;
}

button.copy-btn {
  background: var(--accent);
  color: white;
  border: 0;
  padding: 8px 16px;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
}

button.copy-btn:hover { background: #5aa1ff; }

.instructions {
  text-align: left;
  background: var(--bg);
  border-left: 3px solid var(--accent);
  padding: 12px 16px;
  margin-top: 24px;
  font-size: 14px;
}

.instructions ol { margin: 0; padding-left: 20px; }
.instructions li { margin: 6px 0; }

/* Demo plan tile + form. Free option leads the plan grid with a green
   "FREE" price tag instead of the orange dollar amount the paid plans show. */
.plan.plan-demo {
  border-color: var(--ok);
}
.plan.plan-demo:hover {
  border-color: var(--ok);
  box-shadow: 0 0 0 1px var(--ok);
}
.plan .price.free {
  color: var(--ok);
  font-size: 22px;
  letter-spacing: 1px;
}

#demo-section {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
  margin-top: 16px;
}
#demo-section.hidden { display: none; }
#demo-section h2 { margin: 0 0 8px; font-size: 18px; }
#demo-section .summary { color: var(--text-dim); margin: 0 0 16px; }

.demo-form { display: flex; flex-direction: column; gap: 14px; max-width: 480px; }
.demo-form.hidden { display: none; }
.demo-form label {
  display: flex; flex-direction: column; gap: 6px;
  color: var(--text-dim); font-size: 13px;
}
.demo-form input {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 10px 12px;
  font-size: 15px;
  font-family: inherit;
}
.demo-form input:focus {
  outline: none;
  border-color: var(--accent);
}
.demo-form .fine-print {
  color: var(--text-dim);
  font-size: 12px;
  margin: 0;
}

.btn {
  border: 0;
  border-radius: 12px;
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.05s ease;
}
.btn:disabled { cursor: not-allowed; }
.btn:active:not(:disabled) { transform: scale(0.99); }
.btn-primary {
  background: var(--accent-hot);
  color: #fff;
}
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); box-shadow: var(--orange-glow); }
.btn-primary:disabled { background: #1F1F1F; color: var(--grey-500); }
/* Neutral dark secondary (HIM) — replaces the old solid-blue button so it sits
   quietly next to the orange primary. */
.btn-secondary {
  background: var(--input-fill);
  color: var(--text);
  border: 1px solid var(--line);
}
.btn-secondary:hover:not(:disabled) { background: var(--bg-card-2); border-color: var(--grey-500); }

.demo-success { padding-top: 8px; }
.demo-success.hidden { display: none; }
.demo-success h3 { color: var(--ok); margin: 0 0 8px; }
.demo-success .code-display {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: "Cascadia Code", Consolas, "Courier New", monospace;
  background: var(--bg);
  border: 1px solid var(--accent);
  border-radius: 6px;
  padding: 12px 16px;
  margin: 12px 0;
}
.demo-success .demo-code {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 1px;
  user-select: all;
}
.demo-success .recovery-note {
  color: var(--text-dim);
  font-size: 13px;
  border-left: 3px solid var(--accent-hot);
  padding: 8px 12px;
  margin-top: 12px;
}
.demo-success .recovery-note.hidden { display: none; }

/* Discount row inside the PayPal section. Sits between the summary line
   and the PayPal buttons so the customer applies a code before clicking. */
.discount-row {
  margin: 16px 0;
  padding: 12px 16px;
  background: var(--bg-card-2);
  border: 1px dashed var(--line);
  border-radius: 6px;
}
.discount-row label {
  display: block;
  color: var(--text-dim);
  font-size: 13px;
  margin-bottom: 6px;
}
.discount-input-wrap {
  display: flex;
  gap: 8px;
}
.discount-input-wrap input {
  flex: 1;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 8px 12px;
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 14px;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.discount-input-wrap input:focus {
  outline: none;
  border-color: var(--accent);
}
.discount-input-wrap .btn { white-space: nowrap; }

/* Sale price strikethrough on plan cards */
.plan-on-sale {
  border-color: var(--accent-hot);
}
.price-was {
  margin-top: 4px;
  font-size: 13px;
  color: var(--text-dim);
}
.price-was s { color: var(--text-dim); }
.sale-label {
  color: var(--accent-hot);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 1px;
}

/* ── Account dashboard helpers ───────────────────────────────────────── */

/* Inline verified / unverified badge */
.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 10px;
  vertical-align: middle;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.badge.ok {
  background: rgba(76, 175, 106, 0.15);
  color: var(--ok);
  border: 1px solid rgba(76, 175, 106, 0.35);
}
.badge.warn {
  background: rgba(240, 192, 96, 0.12);
  color: #f0c060;
  border: 1px solid rgba(240, 192, 96, 0.35);
}

/* One unused-license row in the "ready to redeem" section */
.code-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.code-row:last-child { border-bottom: none; }
.code-row code {
  font-family: "Cascadia Code", Consolas, "Courier New", monospace;
  font-size: 15px;
  font-weight: 700;
  background: var(--bg);
  padding: 4px 10px;
  border-radius: 4px;
  border: 1px solid var(--accent);
  letter-spacing: 1px;
  user-select: all;
}

/* Small inline action button (e.g. Copy) */
.btn-small {
  background: var(--bg-card-2);
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.1s;
}
.btn-small:hover { background: var(--accent); color: white; }

/* Soft muted text (empty-state messages) */
.muted {
  color: var(--text-dim);
  font-size: 14px;
  margin: 0;
}

/* SSO (Google / Microsoft) buttons — shared by login + register */
.sso-divider { display:flex; align-items:center; gap:10px; color:var(--text-dim); font-size:12px; margin:18px 0 12px; }
.sso-divider::before, .sso-divider::after { content:""; flex:1; height:1px; background:var(--line); }
.sso-list { display:flex; flex-direction:column; gap:10px; }
.sso-btn { width:100