.live-chat {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #000;
  color: #e8e8e8;
  font-family: Arial, Helvetica, sans-serif;
}

.live-chat__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid #222;
  flex-shrink: 0;
  background: #0a0a0a;
}

.live-chat__title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #fff;
}

.live-chat__online {
  font-size: 11px;
  color: #6b6b6b;
}

.live-chat__online::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  margin-right: 6px;
  vertical-align: middle;
  box-shadow: 0 0 6px #22c55e88;
}

.live-chat__auth {
  padding: 12px;
  border-bottom: 1px solid #1a1a1a;
  flex-shrink: 0;
  background: #050505;
  position: relative;
  overflow: hidden;
}

#chatAuthGuest[hidden],
#chatAuthUser[hidden],
#chatAuthSetup[hidden] {
  display: none !important;
}

#chatAuth iframe,
#chatAuth [id^="gsi_"],
#chatAuth .S9gUrf-YoZ4jf,
#chatAuth div[role="button"]:not(.live-chat__google-btn):not(.live-chat__signout) {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
}

.live-chat__auth-hint {
  margin: 0 0 10px;
  font-size: 12px;
  line-height: 1.4;
  color: #9ca3af;
  text-align: center;
}

.live-chat__auth-setup {
  margin: 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: #1a1208;
  border: 1px solid #4a3a18;
  color: #fbbf24;
  font-size: 11px;
  line-height: 1.45;
  text-align: center;
}

.live-chat__auth-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.live-chat__avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #333;
  flex-shrink: 0;
}

.live-chat__user-name {
  flex: 1;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-chat__signout {
  border: 1px solid #444;
  border-radius: 8px;
  background: #111;
  color: #ccc;
  font-size: 11px;
  padding: 6px 10px;
  cursor: pointer;
  flex-shrink: 0;
}

.live-chat__signout:hover {
  background: #1a1a1a;
  color: #fff;
}

.live-chat__auth-warn {
  margin: 0 0 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #1a1208;
  border: 1px solid #4a3a18;
  color: #fbbf24;
  font-size: 11px;
  line-height: 1.45;
  text-align: center;
}

.live-chat__auth-warn a {
  color: #fde68a;
  font-weight: 700;
}

.live-chat__google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  max-width: 280px;
  margin: 0 auto;
  padding: 11px 16px;
  border: 1px solid #dadce0;
  border-radius: 4px;
  background: #fff;
  color: #3c4043;
  font-size: 14px;
  font-weight: 600;
  font-family: Arial, Helvetica, sans-serif;
  cursor: pointer;
}

.live-chat__google-btn:hover {
  background: #f7f8f8;
}

.live-chat__google-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4285f4, #34a853 50%, #fbbc05 80%, #ea4335);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.live-chat__auth-error {
  margin: 8px 0 0;
  color: #f87171;
  font-size: 11px;
  line-height: 1.4;
  text-align: center;
}

.live-chat__auth iframe,
.live-chat__auth .live-chat__google-mount {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
  border: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

.live-chat__google-mount--hidden {
  position: fixed !important;
  left: -10000px !important;
  top: 0 !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  clip: rect(0, 0, 0, 0) !important;
}

.live-chat__messages {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scroll-behavior: smooth;
}

.live-chat__messages::-webkit-scrollbar {
  width: 5px;
}

.live-chat__messages::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 4px;
}

.live-chat__msg {
  font-size: 13px;
  line-height: 1.45;
  word-break: break-word;
}

.live-chat__msg--system {
  color: #666;
  font-size: 11px;
  text-align: center;
  padding: 4px 0;
}

.live-chat__msg--own .live-chat__author {
  color: #f472b6;
}

.live-chat__author {
  font-weight: 700;
  color: #93c5fd;
  margin-right: 6px;
}

.live-chat__time {
  font-size: 10px;
  color: #555;
  margin-right: 6px;
}

.live-chat__text {
  color: #ddd;
}

.live-chat__input-row {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid #222;
  flex-shrink: 0;
  background: #0a0a0a;
}

.live-chat__input-row input {
  flex: 1;
  background: #111;
  border: 1px solid #333;
  border-radius: 10px;
  color: #fff;
  padding: 10px 14px;
  font-size: 13px;
  outline: none;
}

.live-chat__input-row input:focus {
  border-color: #666;
}

.live-chat__input-row input::placeholder {
  color: #555;
}

.live-chat__send {
  width: 42px;
  height: 42px;
  border: 1px solid #444;
  border-radius: 10px;
  background: #1a1a1a;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  flex-shrink: 0;
}

.live-chat__send:hover {
  background: #252525;
  border-color: #666;
}

.live-chat__send:active {
  transform: scale(0.96);
}

.live-chat__send:disabled,
.live-chat__input-row input:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
