/* Ghost Assistant v2 (Riley Digital Studio)
   Premium glass UI, brand-locked.
*/

:root{
  --ghost-z: 9999;
}

.ghost-launch{
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: var(--ghost-z);
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.16);
  background: radial-gradient(120% 140% at 20% 10%, rgba(0,179,255,.26), rgba(255,255,255,.06));
  backdrop-filter: blur(14px);
  box-shadow: 0 18px 55px rgba(0,0,0,.55);
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease;
}
.ghost-launch:hover{ transform: translateY(-2px); border-color: rgba(0,179,255,.45); }
.ghost-launch svg{ width: 26px; height: 26px; }

.ghost-panel{
  position: fixed;
  right: 18px;
  bottom: 84px;
  width: min(420px, calc(100vw - 36px));
  max-height: min(72vh, 640px);
  z-index: var(--ghost-z);
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.14);
  background: linear-gradient(180deg, rgba(12,16,26,.86), rgba(7,10,15,.92));
  backdrop-filter: blur(18px);
  box-shadow: 0 30px 95px rgba(0,0,0,.62);
  overflow: hidden;
  display: none;
}
.ghost-panel.is-open{ display: grid; grid-template-rows: auto 1fr auto; }

.ghost-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 12px 10px;
  border-bottom: 1px solid rgba(255,255,255,.10);
}
.ghost-title{ display:flex; gap:10px; align-items:center; }
.ghost-badge{
  width: 34px; height: 34px; border-radius: 12px;
  background: radial-gradient(120% 140% at 25% 15%, rgba(0,179,255,.28), rgba(255,255,255,.06));
  border: 1px solid rgba(255,255,255,.14);
  display:grid; place-items:center;
}
.ghost-badge svg{ width:18px; height:18px; }
.ghost-title h4{ margin:0; font: 700 14px/1.1 "Space Grotesk", Inter, system-ui; letter-spacing:.2px; }
.ghost-title p{ margin:2px 0 0; font: 500 12px/1.2 Inter, system-ui; color: rgba(234,242,255,.72); }
.ghost-close{
  width: 36px; height: 36px; border-radius: 14px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.04);
  color: rgba(234,242,255,.86);
  cursor:pointer;
}

.ghost-body{
  padding: 12px;
  overflow: auto;
}

.ghost-msg{ display:flex; gap:10px; margin: 10px 0; }
.ghost-msg .bubble{
  max-width: 86%;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
  color: rgba(234,242,255,.92);
  font: 500 13px/1.42 Inter, system-ui;
  white-space: pre-wrap;
}
.ghost-msg.ai .bubble{
  background: radial-gradient(140% 160% at 10% 0%, rgba(0,179,255,.18), rgba(255,255,255,.035));
  border-color: rgba(0,179,255,.22);
}
.ghost-msg.user{ justify-content:flex-end; }
.ghost-msg.user .bubble{
  background: rgba(0,179,255,.14);
  border-color: rgba(0,179,255,.30);
}

.ghost-chips{ display:flex; flex-wrap:wrap; gap:8px; margin-top: 8px; }
.ghost-chip{
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.04);
  color: rgba(234,242,255,.88);
  font: 600 12px/1 Inter, system-ui;
  cursor:pointer;
  transition: transform .12s ease, border-color .12s ease;
}
.ghost-chip:hover{ transform: translateY(-1px); border-color: rgba(0,179,255,.38); }

.ghost-foot{
  padding: 10px;
  border-top: 1px solid rgba(255,255,255,.10);
  display: grid;
  gap: 8px;
}
.ghost-inputrow{ display:grid; grid-template-columns: 1fr auto; gap: 8px; }
.ghost-input{
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.04);
  padding: 10px 12px;
  color: rgba(234,242,255,.92);
  outline:none;
  font: 500 13px/1.2 Inter, system-ui;
}
.ghost-send{
  border-radius: 14px;
  border: 1px solid rgba(0,179,255,.35);
  background: radial-gradient(120% 140% at 20% 10%, rgba(0,179,255,.30), rgba(255,255,255,.06));
  color: #EAF2FF;
  font: 700 13px/1 Inter, system-ui;
  padding: 10px 12px;
  cursor:pointer;
}

.ghost-mini{
  font: 500 11px/1.35 Inter, system-ui;
  color: rgba(234,242,255,.62);
}
.ghost-mini a{ color: rgba(124,235,255,.92); text-decoration:none; }

@media (max-width: 520px){
  .ghost-panel{ right: 10px; left: 10px; width: auto; }
  .ghost-launch{ right: 12px; bottom: 12px; }
}
