/* The Hypnotist UI – v1 "Midnight Neon" (non‑Gold Standard) */

:root{
  --thy-bg1:#0b1020;
  --thy-bg2:#111a33;
  --thy-card:rgba(255,255,255,0.06);
  --thy-border:rgba(255,255,255,0.12);
  --thy-text:#eaf0ff;
  --thy-muted:rgba(234,240,255,0.72);
  --thy-accent1:#22d3ee;   /* cyan */
  --thy-accent2:#a78bfa;   /* purple */
  --thy-danger:#fb7185;
}

.thy-wrap{
  max-width: 980px;
  margin: 26px auto;
  padding: 0 14px;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Noto Sans", "Liberation Sans", sans-serif;
  color: var(--thy-text);
}

.thy-card{
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.10);
  background:
    radial-gradient(1100px 600px at 20% 0%, rgba(34,211,238,0.18), transparent 55%),
    radial-gradient(900px 520px at 85% 15%, rgba(167,139,250,0.18), transparent 60%),
    linear-gradient(180deg, var(--thy-bg2), var(--thy-bg1));
  box-shadow: 0 18px 60px rgba(0,0,0,0.55);
}

.thy-header{
  background: transparent;
  text-align: center;
  padding: 18px 22px;
  border-bottom: 1px solid rgba(255,255,255,0.10);
  display:flex;
  flex-direction: column;
  gap: 6px;
  align-items:center;
}

.thy-title{
  color: var(--thy-text);
  font-size: 1.35rem;
  letter-spacing: 0.01em;
  margin: 0;
  font-weight: 700;
}

.thy-subtitle{
  color: var(--thy-muted);
  opacity: 1;
  margin: 0;
  font-size: 0.95rem;
}

.thy-header:before{
  content:"";
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(34,211,238,0.85), rgba(167,139,250,0.85));
  box-shadow: 0 8px 22px rgba(0,0,0,0.35);
  flex: 0 0 auto;
}

.thy-header h2{
  color: var(--thy-text);
  font-size: 1.35rem;
  letter-spacing: 0.01em;
  margin: 0;
}

.thy-header p{
  color: var(--thy-muted);
  opacity: 1;
  margin: 4px 0 0;
  font-size: 0.95rem;
}

.thy-body{
  background: transparent;
  padding: 18px 18px 16px;
}

.thy-alert{
  border-radius: 14px;
  padding: 10px 12px;
  margin: 0 0 12px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.18);
  color: var(--thy-text);
}

.thy-alert.thy-alert-red{
  border-color: rgba(251,113,133,0.65);
  color: #ffd9df;
  background: rgba(251,113,133,0.12);
}

.thy-chat{
  background: rgba(0,0,0,0.16);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 18px;
  padding: 14px;
  min-height: 320px;
  max-height: 56vh;
  overflow-y: auto;
  scroll-behavior: smooth;
}

.thy-msg{display:flex;margin:8px 0}
.thy-msg-bot{justify-content:flex-start;align-items:flex-start;gap:10px}
.thy-msg-user{justify-content:flex-end}

/* Chat avatar (assistant only) */
.thy-avatar{
  width: 34px;
  height: 34px;
  border-radius: 999px;
  flex: 0 0 auto;
  object-fit: cover;
  margin-top: 2px;
  box-shadow: 0 10px 22px rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.12);
}

.thy-bubble{
  max-width: min(78%, 720px);
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: 0 10px 28px rgba(0,0,0,0.28);
  font-size: 1rem;
  line-height: 1.45;
  background: rgba(255,255,255,0.06);
  color: var(--thy-text);
}

.thy-msg-user .thy-bubble{
  background: linear-gradient(135deg, rgba(34,211,238,0.22), rgba(167,139,250,0.18));
  border-color: rgba(34,211,238,0.20);
}

.thy-controls{margin-top:14px}
.thy-controls label{display:block;font-weight:650;margin:0 0 8px;color:var(--thy-muted)}

.thy-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:end}

#thy-input{
  width:100%;
  background: rgba(255,255,255,0.06);
  color: var(--thy-text);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 16px;
  padding: 12px 14px;
  font-size: 1rem;
  outline: none;
}

#thy-input:focus{
  border-color: rgba(34,211,238,0.45);
  box-shadow: 0 0 0 4px rgba(34,211,238,0.12);
}

.thy-btn{
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 650;
  font-size: 1rem;
  white-space: nowrap;
  transition: transform .06s ease, filter .2s ease, opacity .2s ease;
}

.thy-btn-primary{
  color: #08101d;
  background: linear-gradient(135deg, var(--thy-accent1), var(--thy-accent2));
  box-shadow: 0 14px 34px rgba(0,0,0,0.40);
}

.thy-btn-secondary{
  color: var(--thy-text);
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
}

.thy-btn:hover{filter:brightness(1.06)}
.thy-btn:active{transform:translateY(1px)}
.thy-btn:disabled{opacity:.55;cursor:not-allowed;filter:grayscale(0.3)}

.thy-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:10px}

.thy-output{
  margin-top: 14px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(0,0,0,0.14);
  border-radius: 18px;
  padding: 14px;
}

.thy-output h3{margin:0 0 8px;font-size:1.05rem;color:var(--thy-text)}
.thy-small-note{margin:0 0 10px;color:var(--thy-muted);font-size:.92rem}

.thy-progress-wrap{margin:12px 0 0}
.thy-progress-label{font-size:.9rem;color:var(--thy-muted);margin-bottom:8px}
.thy-progress-bar{height:10px;background:rgba(255,255,255,0.10);border-radius:999px;overflow:hidden}
.thy-progress-fill{height:100%;width:0;background:linear-gradient(90deg,var(--thy-accent1),var(--thy-accent2))}

.thy-downloads{margin-top:10px}

.thy-download-gate{
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(183, 28, 28, 0.35);
  background: rgba(183, 28, 28, 0.10);
  color: rgba(255, 235, 238, 0.92);
  font-size: 0.92rem;
  line-height: 1.35;
}

/* High-contrast warning text for the download-required message */
.thy-download-gate.thy-download-gate-contrast{
  background: rgba(255,255,255,0.92);
  color: #111;
  border: 2px solid rgba(255, 59, 48, 0.95);
  font-weight: 700;
}

.thy-download-gate.thy-download-gate-contrast strong{font-weight: 800;}

/* PayPal Unlock & Download flow */
.thy-ready{margin:12px 0 10px;padding:10px 12px;border-radius:10px;border:1px solid #cfd2dc;background:rgba(255,255,255,0.8);}
.thy-unlock{margin:10px 0 14px;padding:12px 12px;border-radius:14px;border:1px solid #cfd2dc;background:rgba(255,255,255,0.85);}
.thy-unlock-title{font-size:1.05rem;margin-bottom:6px;color:#000000;}
.thy-unlock-note{font-size:0.95rem;opacity:0.9;margin-bottom:10px;color:#000000;opacity:1;}
.thy-unlock-buttons{max-width:420px;}
.thy-unlock-status{margin-top:10px;font-weight:600;}
.thy-unlock-status.thy-error{color:#b00020;}
.thy-unlock-status.thy-ok{color:#1b5e20;}


.thy-disclaimer{
  margin-top: 12px;
  color: rgba(234,240,255,0.72);
  font-size: .9rem;
}

.thy-footnote{
  text-align:center;
  margin: 10px 0 0;
  color: rgba(234,240,255,0.55);
  font-size: .86rem;
}

@media (max-width: 640px){
  .thy-wrap{padding:0 10px}
  .thy-header{padding:16px}
  .thy-body{padding:14px}
  .thy-row{grid-template-columns:1fr}
  .thy-actions{gap:8px}
  .thy-bubble{max-width:92%}
  .thy-avatar{display:none}
  .thy-msg-bot{gap:0}
}


/* ===== UI Patch: Button Contrast (Teal Accent) ===== */
:root{
  --hb-btn:#2FD3C8;
  --hb-btn-hover:#22B8AE;
  --hb-btn-text:#002B2A;
  --hb-btn-border:rgba(47,211,200,0.35);
}

button, .h-btn, .hypnotist-btn, .hb-btn,
input[type="button"], input[type="submit"], input[type="reset"]{
  background: var(--hb-btn) !important;
  color: var(--hb-btn-text) !important;
  border: 0 !important;
  border-radius: 999px !important;
  padding: 12px 20px !important;
  font-weight: 650 !important;
  letter-spacing: 0.01em !important;
  cursor: pointer !important;
  transition: filter .15s ease, transform .06s ease, background .15s ease !important;
  box-shadow: 0 14px 34px rgba(0,0,0,0.30) !important;
}

button:hover, .h-btn:hover, .hypnotist-btn:hover, .hb-btn:hover,
input[type="button"]:hover, input[type="submit"]:hover, input[type="reset"]:hover{
  background: var(--hb-btn-hover) !important;
  filter: brightness(1.03) !important;
}

button:active, .h-btn:active, .hypnotist-btn:active, .hb-btn:active{
  transform: translateY(1px) !important;
}

button:disabled, .h-btn:disabled, .hypnotist-btn:disabled, .hb-btn:disabled,
input[type="submit"]:disabled{
  opacity: .55 !important;
  cursor: not-allowed !important;
  filter: grayscale(0.2) !important;
}

/* Optional secondary style: add class="is-secondary" */
.is-secondary{
  background: transparent !important;
  color: var(--hb-btn) !important;
  border: 1px solid var(--hb-btn-border) !important;
  box-shadow: none !important;
}
.is-secondary:hover{
  background: rgba(47,211,200,0.12) !important;
}


/* UI tweak: remove top-left blue badge */
.hypnotist-badge,
.hypnotist-header .badge,
.hypnotist-header .logo,
.hypnotist-header img:first-child{
  display:none !important;
}

/* FORCE remove header icon / orb next to title */
.hypnotist-header > *:first-child{
  display:none !important;
}
.hypnotist-header{
  padding-left:22px !important;
}
.hypnotist-header::before,
.hypnotist-header::after{
  display:none !important;
  content:none !important;
}


/* ===== UI FIX: remove header decorative square next to title ===== */
.thy-header:before{
  content: none !important;
  display: none !important;
}
.thy-header{
  gap: 10px !important;
}


/* --- Layout safety net (prevents horizontal growth / push-off) --- */
/*
  CRITICAL (UI-only): keep the UI as a centred floating card so the right-side
  hero image remains visible. Use !important to defeat theme/page-builder overrides.
*/
.thy-wrap{
  width:100%;
  max-width: 920px !important;
  margin: 26px auto !important;
  padding: 0 14px;
  box-sizing:border-box;
}

.thy-card{
  width:100%;
  max-width: 920px !important;
  margin: 0 auto !important;
  box-sizing:border-box;
}


.thy-wrap *{
  box-sizing:border-box;
  min-width:0;
}

.thy-wrap img,
.thy-wrap video,
.thy-wrap canvas,
.thy-wrap svg{
  max-width:100%;
  height:auto;
}

/* UI fix: keep outer shadow + stable layout (no ancestor clipping) */
.thy-card{
  position: relative;
  overflow: hidden;
}

/* Reserve scrollbar space so the UI doesn't "jump" wider/narrower as messages grow */
.thy-chat{
  overflow-y: scroll; /* always reserve scrollbar gutter */
  scrollbar-gutter: stable;
  box-sizing: border-box;
  max-width: 100%;
}

/* Defensive: never allow inner flex/grid children to force expansion */
.thy-wrap, .thy-body, .thy-chat, .thy-input-row{
  max-width: 100%;
  box-sizing: border-box;
}

/* ===== FINAL HARD OVERRIDES (UI only) =====
   Keep the Hypnotist UI as a centred floating card (so the man on the right stays visible)
   and prevent any width-creep when typing or when scrollbars appear.
*/

.thy-wrap{
  max-width: 920px !important;
  width: 100% !important;
  margin: 26px auto !important;
  box-sizing: border-box !important;
}

.thy-card{
  max-width: 920px !important;
  width: 100% !important;
  margin: 0 auto !important;
  box-sizing: border-box !important;
}

/* Never allow inner content to force horizontal growth */
.thy-wrap *,
.thy-card *,
.thy-body *,
.thy-chat *,
.thy-row *{
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

/* Break long strings safely */
.thy-bubble,
#thy-input{
  overflow-wrap: anywhere !important;
  word-break: break-word !important;
}

/* Scrollbar stability: reserve gutter so layout doesn't jump */
.thy-chat{
  overflow-y: scroll !important;
  scrollbar-gutter: stable !important;
}

/* Page scrollbar stability (scoped): keep vertical scrollbar space reserved so
   the overall page width never changes when content grows/shrinks. */
html.thy-scrollbar-stable{
  scrollbar-gutter: stable;
}
body.thy-scrollbar-stable{
  overflow-y: scroll;
}


/* Subtle message fade-in */
@keyframes thyFadeIn{
  from{opacity:0; transform: translateY(4px);}
  to{opacity:1; transform: translateY(0);}
}
.thy-msg-appear{
  animation: thyFadeIn .22s ease-out both;
}

/* Typing indicator */
.thy-typing-bubble{
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.10);
  color: var(--thy-muted);
}
.thy-typing-label{margin-right:4px}
.thy-typing-dots span{
  display:inline-block;
  opacity: .25;
  animation: thyDots 1.1s infinite;
}
.thy-typing-dots span:nth-child(2){animation-delay:.15s}
.thy-typing-dots span:nth-child(3){animation-delay:.3s}
@keyframes thyDots{
  0%, 100%{opacity:.25}
  40%{opacity:1}
}

/* Button spinner removed by request (disable behaviour remains via JS). */

/* THY title logo */
.thy-title-logo{max-width:420px;width:100%;height:auto;display:block;}

/* === HEADER FINAL OVERRIDE (v1.7.6.0) === */
.thy-header{background-color:#000000 !important; padding:14px 0 !important; text-align:center !important;}
.thy-title{width:100% !important; display:flex !important; justify-content:center !important; align-items:center !important;}
.thy-title img, .thy-header img{width:240px !important; max-width:92% !important; height:auto !important; max-height:120px !important; object-fit:contain !important; display:block !important; margin:0 auto !important;}


/* === Ready pill styling (v1.7.6.4) === */
.thy-ready{
  width: fit-content;
  max-width: 100%;
  margin: 12px auto 10px;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 650;
  font-size: 1rem;
  color: #08101d;
  background-color: #2ECCC2 !important; /* SOLID */
  background-image: none !important;   /* kill gradients */
  box-shadow: 0 14px 34px rgba(0,0,0,0.40);
  text-align: center;
}
.thy-ready strong{font-weight: 650;}


.thy-unlock-note strong, .thy-unlock-note .price, .thy-unlock-note span{font-weight:700;}
