/* ═══════════════════════════════════════════
   Timsy Bot — Shared styles
   ═══════════════════════════════════════════ */

#timsy-launcher {
  position: fixed;
  bottom: 90px;
  right: 24px;
  width: 60px;
  height: 60px;
  background: var(--timsy-gradient, linear-gradient(135deg, var(--red, #c8102e), var(--red-dark, #9B0D22)));
  border-radius: 50%;
  cursor: pointer;
  z-index: var(--z-timsy, 1000);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--timsy-shadow, 0 4px 20px rgba(200, 16, 46, 0.5));
  transition: transform 150ms var(--ease-out, ease);
}

#timsy-launcher:hover {
  transform: translateY(-2px);
}

#timsy-chat {
  position: fixed;
  bottom: 160px;
  right: 24px;
  width: 400px;
  max-height: 600px;
  background: #111;
  border-radius: 24px;
  border: 1px solid #333;
  z-index: calc(var(--z-timsy, 1000) - 1);
  display: none;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
}

/* Chat header */
#timsy-chat > div:first-child {
  background: linear-gradient(135deg, var(--red, #c8102e), var(--red-dark, #a00d24));
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

#timsy-chat .timsy-avatar-lg {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

#timsy-chat .timsy-header-info {
  flex: 1;
}

#timsy-chat .timsy-header-name {
  font-weight: 800;
  font-size: 1.3em;
  color: #fff;
}

#timsy-chat .timsy-header-sub {
  font-size: 0.85em;
  color: rgba(255, 255, 255, 0.7);
}

#timsy-chat .timsy-voice-btn {
  cursor: pointer;
  color: rgba(255, 255, 255, 0.7);
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.7em;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

#timsy-chat .timsy-close-btn {
  cursor: pointer;
  color: #fff;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 1.1em;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.12);
  transition: background 150ms ease;
  flex-shrink: 0;
}

#timsy-chat .timsy-close-btn:hover {
  background: rgba(255, 59, 48, 0.8);
}

/* Messages area */
#timsy-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 340px;
}

#timsy-messages::-webkit-scrollbar {
  width: 4px;
}

#timsy-messages::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 4px;
}

/* Input area */
#timsy-chat > div:last-child {
  padding: 12px 16px;
  border-top: 1px solid #222;
  display: flex;
  gap: 10px;
  align-items: center;
}

#timsy-input {
  flex: 1;
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 20px;
  padding: 10px 16px;
  color: #fff;
  font-size: 0.85em;
  outline: none;
  font-family: inherit;
}

#timsy-send-btn {
  width: 38px;
  height: 38px;
  background: var(--red, #c8102e);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* ── Mobile ── */
@media (max-width: 480px) {
  #timsy-launcher {
    bottom: calc(var(--nav-h, 72px) + 16px);
    right: 16px;
    width: 52px;
    height: 52px;
  }

  #timsy-chat {
    bottom: var(--nav-h, 72px);
    right: 0;
    left: 0;
    width: 100%;
    max-height: 85vh;
    border-radius: 24px 24px 0 0;
  }

  #timsy-messages {
    max-height: 50vh;
  }
}
