/* ============================================================
   FIXER / ALFRED — CP2077 Style (standalone, hardcoded values)
   Ported from V2 layout.css — variable mappings:
     --font-headline       -> 'Space Grotesk', sans-serif
     --font-body           -> 'Inter', sans-serif
     --on-surface          -> #e5e2e1
     --on-surface-variant  -> #bac9cc
     --primary-container   -> #00e5ff
     --outline             -> #849396
     --hud-padding         -> 24px
   ============================================================ */

/* ── Fixer notification on status ── */
.fixer-notif {
  cursor: pointer;
  animation: fixerPulse 1s ease-in-out infinite;
  position: relative;
}
.fixer-notif::after {
  content: '1';
  position: absolute;
  top: -6px;
  right: -10px;
  width: 16px;
  height: 16px;
  background: #ff3344;
  color: #fff;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 9px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}
@keyframes fixerPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ============================================================
   INCOMING CALL
   ============================================================ */
.fixer-call {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10000;
}

.fixer-call__frame {
  width: 320px;
  background: rgba(10, 10, 10, 0.95);
  border: 2px solid #ff3344;
  box-shadow: 0 0 40px rgba(255, 51, 68, 0.15), inset 0 0 30px rgba(255, 51, 68, 0.05);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: callPulse 2s ease-in-out infinite;
}
@keyframes callPulse {
  0%, 100% { box-shadow: 0 0 40px rgba(255, 51, 68, 0.15), inset 0 0 30px rgba(255, 51, 68, 0.05); }
  50% { box-shadow: 0 0 60px rgba(255, 51, 68, 0.25), inset 0 0 40px rgba(255, 51, 68, 0.08); }
}

.fixer-call__header {
  padding: 10px 16px;
  border-bottom: 1px solid rgba(255, 51, 68, 0.2);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.fixer-call__signal {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 9px;
  letter-spacing: 0.2em;
  color: #ff3344;
  opacity: 0.6;
}
.fixer-call__name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: #e5e2e1;
  letter-spacing: 0.05em;
}

.fixer-call__avatar {
  position: relative;
  height: 300px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #050505;
}
.fixer-call__avatar img {
  width: 120%;
  padding-top: 165px;
  filter: brightness(1.6);
}
.fixer-call__scanline {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(255, 51, 68, 0.03) 2px,
    rgba(255, 51, 68, 0.03) 4px
  );
  pointer-events: none;
}

.fixer-call__actions {
  display: flex;
  border-top: 1px solid rgba(255, 51, 68, 0.2);
}

.fixer-btn {
  flex: 1;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11px;
  letter-spacing: 0.2em;
  padding: 14px;
  border: none;
  cursor: pointer;
  text-transform: uppercase;
  transition: background 0.2s;
}
.fixer-btn--answer {
  background: rgba(255, 51, 68, 0.15);
  color: #ff3344;
  border-right: 1px solid rgba(255, 51, 68, 0.2);
}
.fixer-btn--answer:hover {
  background: #ff3344;
  color: #0a0a0a;
}
.fixer-btn--dismiss {
  background: rgba(255, 255, 255, 0.03);
  color: #849396;
}
.fixer-btn--dismiss:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #e5e2e1;
}

/* ============================================================
   CHAT WINDOW
   ============================================================ */
.fixer-chat {
  position: fixed;
  bottom: 60px;
  right: 24px;
  z-index: 10000;
  width: 400px;
  max-height: 600px;
}

.fixer-chat__frame {
  background: rgba(10, 10, 10, 0.95);
  border: 2px solid #ff3344;
  box-shadow: 0 0 30px rgba(255, 51, 68, 0.1);
  display: flex;
  flex-direction: column;
  max-height: 580px;
}

.fixer-chat__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 51, 68, 0.15);
  background: rgba(255, 51, 68, 0.04);
}

.fixer-chat__contact {
  display: flex;
  align-items: center;
  gap: 10px;
}

.fixer-chat__thumb-wrap {
  width: 44px;
  height: 44px;
  overflow: hidden;
  border: 1px solid rgba(255, 51, 68, 0.3);
  flex-shrink: 0;
}
.fixer-chat__thumb {
  width: 160%;
  margin-top: -54%;
  margin-left: -28%;
  filter: brightness(1.2);
}

.fixer-chat__name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #e5e2e1;
  letter-spacing: 0.05em;
  display: block;
}

.fixer-chat__status {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 9px;
  letter-spacing: 0.15em;
  color: #ff3344;
  display: block;
}

.fixer-chat__close {
  background: none;
  border: none;
  color: #849396;
  cursor: pointer;
  font-size: 16px;
  padding: 4px 8px;
  transition: color 0.2s;
}
.fixer-chat__close:hover {
  color: #ff3344;
}

.fixer-chat__body {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 250px;
  max-height: 400px;
  scrollbar-width: thin;
  scrollbar-color: #ff3344 rgba(255, 51, 68, 0.08);
}
.fixer-chat__body::-webkit-scrollbar { width: 5px; }
.fixer-chat__body::-webkit-scrollbar-track { background: rgba(255, 51, 68, 0.08); }
.fixer-chat__body::-webkit-scrollbar-thumb { background: #ff3344; border-radius: 2px; }
.fixer-chat__body::-webkit-scrollbar-thumb:hover { background: #ff5566; }

/* Message bubbles */
.fixer-chat__body .msg-alfred {
  align-self: flex-start;
  background: rgba(255, 51, 68, 0.06);
  border-left: 2px solid #ff3344;
  padding: 10px 14px;
  max-width: 85%;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  line-height: 1.5;
  color: #ff3344;
  white-space: pre-wrap;
}

.msg-alfred .msg-deco {
  color: #ff3344;
}

.msg-alfred .msg-ascii {
  display: block;
  font-family: 'Share Tech Mono', 'Courier New', monospace;
  font-size: 10px;
  line-height: 1.15;
  white-space: pre;
  color: #ff3344;
  margin-bottom: 8px;
}

.fixer-chat__body .msg-user {
  align-self: flex-end;
  background: rgba(0, 229, 255, 0.08);
  border-right: 2px solid #00e5ff;
  padding: 10px 14px;
  max-width: 85%;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  line-height: 1.5;
  color: #e5e2e1;
}

.fixer-chat__input {
  display: flex;
  border-top: 1px solid rgba(255, 51, 68, 0.15);
}
.fixer-chat__input input {
  flex: 1;
  background: rgba(255, 255, 255, 0.03);
  border: none;
  padding: 14px 16px;
  color: #e5e2e1;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  letter-spacing: 0.03em;
  outline: none;
}
.fixer-chat__input input::placeholder {
  color: #849396;
  opacity: 0.5;
}
.fixer-chat__input button {
  background: rgba(255, 51, 68, 0.12);
  color: #ff3344;
  border: none;
  padding: 14px 20px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11px;
  letter-spacing: 0.15em;
  cursor: pointer;
  transition: background 0.2s;
}
.fixer-chat__input button:hover {
  background: #ff3344;
  color: #0a0a0a;
}

/* Error / thinking bubbles */
.fixer-msg.thinking,
.fixer-msg.error {
  align-self: flex-start;
  padding: 10px 14px;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  color: #849396;
  font-style: italic;
}
.fixer-msg.error {
  color: #ff3344;
}
