/* Sam Chat Widget — getsamregistered.com */
#sam-chat-root { all: initial; }
#sam-chat-root *, #sam-chat-root *::before, #sam-chat-root *::after { box-sizing: border-box; }
#sam-chat-root {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 999999;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: #e0e0e0;
}

/* Floating "Call Sam" button — sits above the chat bubble. Sean order 2026-05-22. */
#sam-call-bubble {
  position: fixed;
  bottom: 96px;
  right: 20px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px 8px 10px;
  background: linear-gradient(135deg, #FFD700, #FFA500);
  color: #0a0a0a;
  font-weight: 700;
  font-size: 14px;
  border-radius: 28px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.45), 0 0 0 2px rgba(255,215,0,0.25);
  text-decoration: none;
  cursor: pointer;
  z-index: 999999;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
#sam-call-bubble:hover { transform: scale(1.06); box-shadow: 0 6px 22px rgba(0,0,0,0.55), 0 0 0 3px rgba(255,215,0,0.45); }
#sam-call-bubble .sam-call-label { letter-spacing: 0.2px; }
@media (max-width: 480px) {
  #sam-call-bubble { bottom: 88px; right: 12px; padding: 7px 12px 7px 9px; font-size: 13px; }
  #sam-call-bubble .sam-call-label { display: none; }
}

/* Floating bubble */
#sam-chat-bubble {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FFD700, #FFA500);
  color: #0a0a0a;
  border: none;
  cursor: pointer;
  box-shadow: 0 6px 24px rgba(0,0,0,0.45), 0 0 0 3px rgba(255,215,0,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
#sam-chat-bubble:hover { transform: scale(1.08); box-shadow: 0 8px 30px rgba(0,0,0,0.55), 0 0 0 4px rgba(255,215,0,0.35); }
#sam-chat-bubble .sam-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #e53935;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  border-radius: 999px;
  padding: 2px 6px;
  border: 2px solid #0a0a0a;
  display: none;
}
#sam-chat-bubble .sam-badge.show { display: block; }

/* Panel */
#sam-chat-panel {
  position: fixed;
  bottom: 96px;
  right: 20px;
  width: 380px;
  max-width: calc(100vw - 24px);
  height: 560px;
  max-height: calc(100vh - 120px);
  background: #151515;
  border: 2px solid #FFD700;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
  display: none;
  flex-direction: column;
  overflow: hidden;
}
#sam-chat-panel.open { display: flex; }

/* Header */
#sam-chat-header {
  background: linear-gradient(135deg, #FFD700, #FFA500);
  color: #0a0a0a;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
}
#sam-chat-header .sam-title { display: flex; align-items: center; gap: 10px; font-size: 15px; }
#sam-chat-header .sam-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #0a0a0a;
  color: #FFD700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 15px;
}
#sam-chat-header .sam-sub { font-size: 11px; font-weight: 500; opacity: 0.75; }
#sam-chat-close {
  background: transparent;
  border: none;
  color: #0a0a0a;
  font-size: 22px;
  font-weight: 800;
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
}
#sam-chat-close:hover { opacity: 0.7; }

/* Messages */
#sam-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  background: #0d0d0d;
  scrollbar-width: thin;
  scrollbar-color: #333 #0d0d0d;
}
#sam-chat-messages::-webkit-scrollbar { width: 8px; }
#sam-chat-messages::-webkit-scrollbar-thumb { background: #333; border-radius: 4px; }

.sam-msg { margin-bottom: 12px; display: flex; }
.sam-msg.in { justify-content: flex-start; }
.sam-msg.out { justify-content: flex-end; }
.sam-msg .bubble {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.45;
  word-wrap: break-word;
  white-space: pre-wrap;
}
.sam-msg.in .bubble { background: #1f1f1f; color: #e0e0e0; border-bottom-left-radius: 4px; border: 1px solid #2a2a2a; }
.sam-msg.out .bubble { background: linear-gradient(135deg, #FFD700, #FFA500); color: #0a0a0a; border-bottom-right-radius: 4px; font-weight: 500; }
.sam-msg .bubble a { color: #FFD700; }
.sam-msg.out .bubble a { color: #0a0a0a; text-decoration: underline; }
.sam-msg .bubble p { margin: 0 0 6px 0; }
.sam-msg .bubble p:last-child { margin-bottom: 0; }
.sam-msg .bubble ul, .sam-msg .bubble ol { margin: 6px 0 6px 20px; }
.sam-msg .bubble code { background: rgba(0,0,0,0.25); padding: 1px 5px; border-radius: 4px; font-size: 12.5px; }
.sam-msg .bubble strong { font-weight: 700; }
.sam-msg .bubble .sig { display: block; margin-top: 6px; font-size: 11.5px; opacity: 0.65; font-style: italic; }

.sam-typing {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 12px 14px;
  background: #1f1f1f;
  border: 1px solid #2a2a2a;
  border-radius: 14px;
  border-bottom-left-radius: 4px;
}
.sam-typing span {
  width: 7px; height: 7px; border-radius: 50%;
  background: #FFD700;
  animation: sam-bounce 1.2s infinite ease-in-out;
}
.sam-typing span:nth-child(2) { animation-delay: 0.2s; }
.sam-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes sam-bounce { 0%, 80%, 100% { transform: translateY(0); opacity: 0.5; } 40% { transform: translateY(-6px); opacity: 1; } }

/* Input */
#sam-chat-input-row {
  border-top: 1px solid #2a2a2a;
  background: #151515;
  padding: 10px;
  display: flex;
  gap: 8px;
  align-items: flex-end;
}
#sam-chat-input {
  flex: 1;
  background: #0d0d0d;
  border: 1px solid #333;
  border-radius: 10px;
  color: #e0e0e0;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  resize: none;
  max-height: 120px;
  min-height: 40px;
  outline: none;
}
#sam-chat-input:focus { border-color: #FFD700; }
#sam-chat-send {
  background: linear-gradient(135deg, #FFD700, #FFA500);
  color: #0a0a0a;
  border: none;
  border-radius: 10px;
  padding: 10px 16px;
  font-weight: 700;
  cursor: pointer;
  font-size: 14px;
  font-family: inherit;
}
#sam-chat-send:disabled { opacity: 0.5; cursor: not-allowed; }
#sam-chat-send:hover:not(:disabled) { opacity: 0.9; }

#sam-chat-footer {
  text-align: center;
  font-size: 10.5px;
  color: #666;
  padding: 4px 0 6px;
  background: #151515;
  border-top: 1px solid #1f1f1f;
}

@media (max-width: 480px) {
  #sam-chat-panel {
    width: calc(100vw - 16px);
    right: 8px;
    bottom: 88px;
    height: calc(100vh - 110px);
  }
  #sam-chat-root { bottom: 12px; right: 12px; }
}
