/* pedro-chat.css: Pedro's chat (Assets/js/pedro-chat.js) in the Ultron / JARVIS look.
 * .pc-full: the list of conversations beside the chat (a drawer on phones) and, on phones, the app's
 * proposed bar: four tabs in a pill and Pedro's sphere beside it, where Alinea puts Allie.
 * .pc-sheet: the compact chat that rises over a page (the sign-up's "Ask Pedro").
 * Colours come from --sa / --sb (the look), with Ultron as the fallback.
 */
.pc {
  position: relative; display: flex; width: 100%; height: 100%; overflow: hidden;
  background: #02060c; color: #EDEFF2; font-family: var(--sans, 'Inter', system-ui, sans-serif);
}
.pc button { font: inherit; color: inherit; }
.pc svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.pc-icon {
  width: 38px; height: 38px; flex: none; border-radius: 50%; display: grid; place-items: center; cursor: pointer; padding: 0;
  color: rgba(var(--sb, 255,224,178), .88); background: transparent; border: 1px solid rgba(var(--sa, 255,156,56), .22);
  transition: background .2s, border-color .2s;
}
.pc-icon:hover { background: rgba(var(--sa, 255,156,56), .1); border-color: rgba(var(--sa, 255,156,56), .55); }
.pc-icon svg { width: 18px; height: 18px; }
.pc :focus-visible { outline: 2px solid rgb(var(--sa, 255,156,56)); outline-offset: 2px; }

/* Pedro's small sphere: a light for avatars (the full drawing is the big one) */
.pc-orb-mini {
  position: relative; flex: none; width: 26px; height: 26px; border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--sb, 255,224,178), 1) 0 11%, rgba(var(--sa, 255,156,56), .9) 28%, rgba(var(--sa, 255,156,56), .16) 60%, transparent 70%);
  box-shadow: 0 0 14px rgba(var(--sa, 255,156,56), .5);
}
.pc-orb-mini::after { content: ''; position: absolute; inset: -3px; border-radius: 50%; border: 1px solid rgba(var(--sa, 255,156,56), .45); }
.pc-orb-mini.is-live { animation: pc-pulse 1.5s ease-in-out infinite; }
@keyframes pc-pulse { 50% { transform: scale(1.12); box-shadow: 0 0 22px rgba(var(--sa, 255,156,56), .8); } }

/* ── The list of conversations ── */
.pc-side {
  width: 300px; flex: none; display: flex; flex-direction: column; gap: 12px;
  padding: max(16px, env(safe-area-inset-top)) 14px max(16px, env(safe-area-inset-bottom));
  background: #050a14; border-right: 1px solid rgba(var(--sa, 255,156,56), .14);
}
.pc-side-top { display: flex; align-items: center; gap: 10px; min-height: 40px; }
.pc-side-top b { flex: 1; font-size: 19px; font-weight: 600; letter-spacing: -.01em; }
.pc-new {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; cursor: pointer;
  border: 1px solid rgba(var(--sa, 255,156,56), .32); background: rgba(var(--sa, 255,156,56), .09);
  color: rgb(var(--sb, 255,224,178)); font-weight: 600; font-size: 14px; transition: background .2s, box-shadow .2s;
}
.pc-new:hover { background: rgba(var(--sa, 255,156,56), .16); box-shadow: 0 0 22px -8px rgba(var(--sa, 255,156,56), .8); }
.pc-new svg { width: 18px; height: 18px; }
.pc-search { display: flex; align-items: center; gap: 8px; padding: 0 12px; height: 40px; border-radius: 12px; background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .07); }
.pc-search svg { width: 16px; height: 16px; color: rgba(236, 246, 255, .45); flex: none; }
.pc-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: #fff; font-size: 16px; }
.pc-search input::placeholder { color: rgba(236, 246, 255, .38); }
.pc-list { flex: 1; overflow-y: auto; margin: 0 -6px; padding: 0 6px 12px; scrollbar-width: thin; }
.pc-group { padding: 14px 8px 6px; font-size: 10.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: rgba(236, 246, 255, .4); }
.pc-item { position: relative; display: flex; align-items: center; border-radius: 12px; transition: background .15s; animation: pc-in .35s ease both; }
.pc-item:hover, .pc-item.is-on { background: rgba(var(--sa, 255,156,56), .08); }
.pc-item.is-on { box-shadow: inset 2px 0 0 rgb(var(--sa, 255,156,56)); }
.pc-item-main {
  flex: 1; min-width: 0; display: grid; grid-template-columns: 22px minmax(0, 1fr); column-gap: 10px; row-gap: 1px;
  padding: 10px 6px 10px 10px; text-align: left; background: none; border: 0; cursor: pointer;
}
.pc-item-ico { grid-row: span 2; padding-top: 1px; color: rgba(var(--sa, 255,156,56), .85); }
.pc-item-ico svg { width: 18px; height: 18px; }
.pc-item-t { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-item-p { font-size: 12px; color: rgba(236, 246, 255, .45); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-item-more { width: 32px; height: 32px; margin-right: 4px; border-color: transparent; opacity: 0; }
.pc-item:hover .pc-item-more, .pc-item.is-on .pc-item-more, .pc-item-more:focus-visible { opacity: 1; }
@media (hover: none) { .pc-item-more { opacity: .7; } }
.pc-menu {
  position: absolute; right: 6px; top: calc(100% - 6px); z-index: 5; min-width: 168px; padding: 6px; border-radius: 12px;
  background: #0c1526; border: 1px solid rgba(var(--sa, 255,156,56), .26); box-shadow: 0 22px 40px -12px rgba(0, 0, 0, .85);
  animation: pc-in .18s ease both;
}
.pc-menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px; border: 0; border-radius: 8px; background: none; cursor: pointer; font-size: 13.5px; text-align: left; }
.pc-menu button:hover { background: rgba(var(--sa, 255,156,56), .1); }
.pc-menu button svg { width: 16px; height: 16px; }
.pc-menu .is-danger { color: #ff8f7c; }
.pc-rename { width: 100%; min-width: 0; font: 500 14px var(--sans, sans-serif); color: #fff; background: rgba(0, 0, 0, .35); border: 1px solid rgb(var(--sa, 255,156,56)); border-radius: 6px; padding: 3px 6px; outline: 0; }
.pc-list-none { padding: 42px 10px; text-align: center; font-size: 13px; color: rgba(236, 246, 255, .4); }

/* ── The chat ── */
.pc-main { position: relative; flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; padding: 0; } /* a <section>: cpi-elite.css pads every section */
.pc-head { display: flex; align-items: center; gap: 12px; padding: max(12px, env(safe-area-inset-top)) 16px 10px; border-bottom: 1px solid rgba(var(--sa, 255,156,56), .1); flex: none; }
.pc-head-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pc-title { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-sub { font-size: 12px; color: rgba(236, 246, 255, .5); }
.pc-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 18px 16px 10px; }
.pc-empty { display: flex; flex-direction: column; align-items: center; text-align: center; padding-top: 2vh; }
.pc-empty[hidden] { display: none; }
.pc-empty-orb { width: min(66vw, 300px); aspect-ratio: 1; }
.pc-empty-orb canvas { display: block; width: 100%; height: 100%; }
.pc-hello { margin: -6px 0 0; font-family: var(--sans, sans-serif); font-weight: 600; letter-spacing: -.02em; font-size: clamp(26px, 6.4vw, 40px); line-height: 1.08; color: #F4F1EA; }
.pc-hello span, .pc-hello em { display: block; animation: pc-rise .8s cubic-bezier(.2, .7, .2, 1) both; }
.pc-hello em { font-family: var(--serif, Georgia, serif); font-style: italic; font-weight: 400; font-size: 1.12em; color: rgb(var(--sa, 255,156,56)); text-shadow: 0 0 26px rgba(var(--sa, 255,156,56), .35); animation-delay: .12s; }
.pc-msgs { width: 100%; max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }
.pc-msg { animation: pc-in .35s ease both; }
.pc-user {
  align-self: flex-end; max-width: 84%; padding: 11px 15px; border-radius: 18px 18px 6px 18px;
  background: linear-gradient(180deg, rgba(var(--sa, 255,156,56), .22), rgba(var(--sa, 255,156,56), .1));
  border: 1px solid rgba(var(--sa, 255,156,56), .36); color: #FFF7EA; font-size: 15px; line-height: 1.5;
}
.pc-bot { display: flex; gap: 12px; align-items: flex-start; }
.pc-bot .pc-orb-mini { margin-top: 2px; }
.pc-text { min-width: 0; font-size: 15.5px; line-height: 1.66; color: rgba(236, 246, 255, .94); }
.pc-text p { margin: 0; }
.pc-text p + p { margin-top: 10px; }
/* Pedro's live answers carry a little markdown (pedro-chat.js md()). */
.pc-text ul, .pc-text ol { margin: 8px 0 0; padding-left: 20px; }
.pc-text ul + p, .pc-text ol + p { margin-top: 10px; }
.pc-text li + li { margin-top: 4px; }
.pc-text strong { color: #fff; font-weight: 600; }
.pc-text a { color: rgb(var(--sb, 255,224,178)); text-decoration: underline; text-underline-offset: 2px; }
.pc-text code { font-family: ui-monospace, Menlo, monospace; font-size: .92em; padding: 1px 5px; border-radius: 5px; background: rgba(255, 255, 255, .07); }
/* Where the account stands (join.html?home): one line above the conversation. */
.pc-banner { margin: 4px 0 18px; padding: 14px 16px; border-radius: 16px; border: 1px solid rgba(var(--sa, 255,156,56), .3);
  background: linear-gradient(180deg, rgba(var(--sa, 255,156,56), .1), rgba(3, 10, 20, .6)); }
.pc-banner[hidden] { display: none; }
.pc-banner p { margin: 0; font-size: 14px; line-height: 1.55; color: rgba(236, 246, 255, .92); }
.pc-banner-a { display: inline-block; margin-top: 10px; padding: 9px 16px; border-radius: 99px; font: 700 12.5px var(--sans, system-ui);
  color: #170e02; background: rgb(var(--sa, 255,156,56)); text-decoration: none; }
.pc-signout { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 12px 10px; border: 0; border-top: 1px solid rgba(255, 255, 255, .07);
  background: none; color: rgba(236, 246, 255, .62); font: 500 13.5px var(--sans, system-ui); cursor: pointer; text-align: left; }
.pc-signout:hover { color: rgb(var(--sb, 255,224,178)); }
.pc-signout svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.pc-w { animation: pc-word .5s ease both; }
.pc-thinking { align-items: center; }
.pc-shimmer {
  font-size: 14px; color: transparent; -webkit-background-clip: text; background-clip: text;
  background-image: linear-gradient(90deg, rgba(236, 246, 255, .3), rgb(var(--sb, 255,224,178)), rgba(236, 246, 255, .3));
  background-size: 200% 100%; animation: pc-shimmer 1.5s linear infinite;
}

/* Suggestions, the composer, the note */
.pc-chips { flex: none; display: flex; gap: 8px; overflow-x: auto; padding: 8px 16px 4px; scrollbar-width: none; width: 100%; max-width: 792px; margin: 0 auto; }
.pc-chips::-webkit-scrollbar { display: none; }
.pc-chips[hidden] { display: none; }
.pc-full:not(.has-msgs) .pc-chips { flex-wrap: wrap; justify-content: center; }
.pc-chip {
  flex: none; padding: 10px 15px; border-radius: 99px; cursor: pointer; font-size: 13.5px; white-space: nowrap;
  border: 1px solid rgba(var(--sa, 255,156,56), .3); background: rgba(3, 10, 20, .65); color: rgb(var(--sb, 255,224,178));
  transition: background .2s, border-color .2s, transform .15s; animation: pc-in .45s ease both;
}
.pc-chip:nth-child(2) { animation-delay: .06s; } .pc-chip:nth-child(3) { animation-delay: .12s; } .pc-chip:nth-child(4) { animation-delay: .18s; }
.pc-chip:hover { background: rgba(var(--sa, 255,156,56), .13); border-color: rgba(var(--sa, 255,156,56), .6); }
.pc-chip:active { transform: scale(.97); }
.pc-compose {
  flex: none; display: flex; align-items: flex-end; gap: 6px; width: calc(100% - 32px); max-width: 760px; margin: 8px auto 0;
  padding: 7px 7px 7px 16px; border-radius: 26px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(var(--sa, 255,156,56), .26);
  transition: border-color .2s, box-shadow .25s;
}
.pc-compose:focus-within { border-color: rgba(var(--sa, 255,156,56), .75); box-shadow: 0 0 30px -10px rgba(var(--sa, 255,156,56), .7); }
.pc-compose textarea { flex: 1; min-width: 0; resize: none; border: 0; outline: 0; background: transparent; color: #fff; font: 400 16px/1.45 var(--sans, sans-serif); padding: 8px 0; max-height: 140px; }
.pc-compose textarea::placeholder { color: rgba(236, 246, 255, .38); }
.pc-mic { border-color: transparent; }
.pc-send {
  width: 40px; height: 40px; flex: none; border: 0; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  background: rgb(var(--sa, 255,156,56)); color: #170e02; transition: background .2s, transform .15s, box-shadow .2s;
  box-shadow: 0 0 20px -6px rgba(var(--sa, 255,156,56), .9);
}
.pc-send svg { width: 18px; height: 18px; stroke-width: 2.3; }
.pc-send:disabled { background: rgba(var(--sa, 255,156,56), .22); color: rgba(0, 0, 0, .45); box-shadow: none; cursor: default; }
.pc-send:active:not(:disabled) { transform: scale(.94); }
.pc-note { flex: none; margin: 0; padding: 8px 16px max(10px, env(safe-area-inset-bottom)); text-align: center; font-size: 11px; color: rgba(236, 246, 255, .38); }

/* The app's proposed bar (phones): four tabs, and Pedro beside them */
.pc-appbar { flex: none; display: flex; align-items: center; gap: 10px; padding: 4px 12px max(12px, env(safe-area-inset-bottom)); }
.pc-appbar-pill {
  flex: 1; height: 60px; display: flex; justify-content: space-around; align-items: center; border-radius: 24px;
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .09); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
}
.pc-appbar-pill button { display: flex; flex-direction: column; align-items: center; gap: 4px; background: none; border: 0; cursor: pointer; color: rgba(236, 246, 255, .5); font-size: 9.5px; font-weight: 500; }
.pc-appbar-pill svg { width: 19px; height: 19px; }
.pc-appbar-orb {
  position: relative; width: 60px; height: 60px; flex: none; padding: 0; border-radius: 50%; overflow: hidden; cursor: pointer;
  border: 1px solid rgba(var(--sa, 255,156,56), .55); background: radial-gradient(circle, rgba(var(--sa, 255,156,56), .16), #050b16 70%);
  box-shadow: 0 0 26px -4px rgba(var(--sa, 255,156,56), .75);
}
.pc-appbar-orb canvas { display: block; width: 100%; height: 100%; }

.pc-toast {
  position: absolute; left: 50%; bottom: 150px; z-index: 30; max-width: 86%; padding: 10px 14px; border-radius: 12px; text-align: center;
  background: #0c1526; border: 1px solid rgba(var(--sa, 255,156,56), .36); color: rgb(var(--sb, 255,224,178)); font-size: 13px; line-height: 1.45;
  opacity: 0; transform: translate(-50%, 16px); pointer-events: none; transition: opacity .25s, transform .3s;
}
.pc-toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* The sheet */
.pc-sheet { flex-direction: column; background: transparent; }
.pc-sheet .pc-head { padding-top: 16px; }
.pc-sheet .pc-scroll { padding-top: 16px; }

/* Phones: the list is a drawer */
@media (max-width: 899px) {
  .pc-full .pc-side {
    position: absolute; z-index: 20; top: 0; bottom: 0; left: 0; width: min(86vw, 320px);
    transform: translateX(-102%); transition: transform .34s cubic-bezier(.2, .7, .2, 1); box-shadow: 30px 0 60px -20px rgba(0, 0, 0, .85);
  }
  .pc-full.side-open .pc-side { transform: none; }
  .pc-scrim { position: absolute; inset: 0; z-index: 15; background: rgba(0, 0, 0, .55); opacity: 0; pointer-events: none; transition: opacity .3s; }
  .pc-full.side-open .pc-scrim { opacity: 1; pointer-events: auto; }
}
@media (min-width: 900px) {
  .pc-side-open, .pc-side-x, .pc-scrim, .pc-appbar { display: none; }
  .pc-scroll { padding: 28px 32px 12px; }
}

@keyframes pc-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes pc-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes pc-word { from { opacity: 0; filter: blur(4px); } to { opacity: 1; filter: none; } }
@keyframes pc-shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) {
  .pc *, .pc-item, .pc-msg, .pc-chip, .pc-w { animation: none !important; transition: none !important; }
}
