/* © 2026 HumanWidget. All Rights Reserved. */

:root {
  --accent: #bd7bff;
  --accent-dark: #a753fb;
  --accent-light: #f3e8ff;
  --bg: #f7f5ff;
  --surface: #ffffff;
  --border: #e8e2f5;
  --text-primary: #1a1523;
  --text-secondary: #6b5f82;
  --text-muted: #9e93b3;
  --error: #e53e3e;
  --success: #38a169;
  --shadow-sm: 0 1px 3px rgba(100, 70, 180, 0.08);
  --shadow-md: 0 4px 24px rgba(100, 70, 180, 0.12);
  --shadow-lg: 0 12px 48px rgba(100, 70, 180, 0.18);
  --radius: 16px;
  --radius-sm: 10px;
  --font: "DM Sans", -apple-system, sans-serif;
  --font-mono: "DM Mono", monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
  font-family: var(--font);
  background-color: var(--bg);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
}

/* =====================
   SCREENS
   ===================== */

.screen {
  display: none;
  width: 100%;
  height: 100%;
  position: fixed;
  top: 0;
  left: 0;
  overflow-y: auto;
}

.screen.active {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* =====================
   PRE-CHAT SCREEN
   ===================== */

#preChatScreen {
  background: var(--bg);
  padding: 24px 16px;
}

.prechat-card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  padding: 40px 36px;
  width: 100%;
  max-width: 420px;
  animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.prechat-card.centered {
  text-align: center;
  padding: 60px 40px;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.prechat-logo {
  margin-bottom: 20px;
}

.prechat-title {
  font-size: 1.3em;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
  line-height: 1.2;
}

.prechat-description {
  font-size: 0.9em;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 8px;
}

.prechat-welcome {
  font-size: 0.875em;
  color: var(--text-secondary);
  background: var(--accent-light);
  border-left: 3px solid var(--accent);
  padding: 10px 14px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  line-height: 1.5;
  margin-bottom: 24px;
}

.prechat-welcome:empty {
  display: none;
}

.rules-ack-group {
  background: var(--accent-light);
  border: 1.5px solid rgba(189, 123, 255, 0.3);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}

.rules-ack-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.88em;
  color: var(--text-secondary);
  cursor: pointer;
  line-height: 1.4;
}

.rules-ack-label input[type="checkbox"] {
  margin-top: 2px;
  accent-color: var(--accent);
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  cursor: pointer;
}

.join-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

#joinAccessCodeGroup {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

#joinAccessCodeGroup label {
  flex-shrink: 0;
  margin: 0;
}

#joinAccessCodeGroup input {
  width: 180px;
  flex-shrink: 0;
}

.form-group label {
  font-size: 0.8em;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-group input {
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.95em;
  color: var(--text-primary);
  background: var(--surface);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
}

.form-group input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(189, 123, 255, 0.15);
}

.form-group input::placeholder {
  color: var(--text-muted);
}

.join-error {
  font-size: 0.85em;
  color: var(--error);
  background: #fff5f5;
  border: 1px solid #fed7d7;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
}

.join-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  padding: 14px 24px;
  font-family: var(--font);
  font-size: 0.95em;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
  margin-top: 4px;
}

.join-btn:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
}

.join-btn:active {
  transform: translateY(0);
}

.join-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.prechat-footer {
  margin-top: 20px;
  text-align: center;
}

.prechat-footer a {
  font-size: 0.75em;
  color: var(--text-muted);
  text-decoration: none;
}

.prechat-footer a:hover {
  color: var(--accent);
}

.archived-icon {
  font-size: 3em;
  margin-bottom: 16px;
}

/* =====================
   CHAT SCREEN
   ===================== */

#chatScreen {
  background: var(--bg);
  padding: 0;
  align-items: stretch;
  justify-content: stretch;
}

.chat-layout {
  display: flex;
  flex-direction: column;
  width: 580px;
  min-width: 480px;
  max-width: 580px;
  height: 100%;
  margin: 0;
  background: var(--surface);
  box-shadow: var(--shadow-md);
  animation: fadeIn 0.3s ease;
  flex-shrink: 0;
}

/* No video — chat expands to full width */
.chat-layout.no-video {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* HEADER */
.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 10;
}

.chat-header-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chat-room-avatar {
  width: 36px;
  height: 36px;
  background: var(--accent);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.chat-room-name {
  display: block;
  font-weight: 600;
  font-size: 0.95em;
  color: var(--text-primary);
  line-height: 1.2;
}

.participant-count {
  display: block;
  font-size: 0.75em;
  color: var(--text-muted);
}

.chat-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.my-badge {
  background: var(--accent-light);
  border: 1px solid rgba(189, 123, 255, 0.3);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 0.8em;
  color: var(--accent-dark);
  font-weight: 500;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* SOUND TOGGLE */
.sound-toggle-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 6px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease, background 0.2s ease;
  flex-shrink: 0;
}

.sound-toggle-btn:hover {
  background: var(--accent-light);
  color: var(--accent-dark);
}

.sound-toggle-btn.active {
  color: var(--accent);
}

/* RULES TOGGLE BUTTON */
.rules-toggle-btn {
  background: none;
  border: 1px solid transparent;
  border-radius: 20px;
  padding: 6px 16px;
  font-family: var(--font);
  font-size: 0.8em;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  flex-shrink: 0;
}

.rules-toggle-btn:hover {
  background: var(--accent-light);
  color: var(--accent-dark);
  border-color: var(--border);
}

.rules-toggle-btn.active {
  background: var(--accent-light);
  color: var(--accent-dark);
  border-color: var(--border);
}

/* DESCRIPTION BANNER */
.description-banner {
  background: var(--accent-light);
  border-bottom: 1px solid rgba(189, 123, 255, 0.2);
  padding: 8px 20px;
  flex-shrink: 0;
}

.description-banner-full {
  font-size: 0.82em;
  color: var(--text-secondary);
  line-height: 1.6;
  white-space: pre-wrap;
}

.description-banner-toggle {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.75em;
  color: var(--accent-dark);
  font-weight: 600;
  padding: 4px 0 0 0;
  display: block;
}

.description-banner-toggle:hover {
  text-decoration: underline;
}

.rules-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
}

.rules-modal {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.18);
  width: 90%;
  max-width: 420px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.rules-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 12px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.rules-modal-title {
  font-size: 0.95em;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.rules-modal-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
}

.rules-modal-close:hover {
  color: var(--text-primary);
  background: var(--accent-light);
}

.rules-modal-body {
  overflow-y: auto;
  padding: 16px 20px 20px 20px;
  font-size: 0.875em;
  color: var(--text-secondary);
  line-height: 1.6;
  white-space: pre-wrap;
}

/* MESSAGES */
.chat-messages {
  flex-grow: 1;
  overflow-y: auto;
  padding: 20px 20px 10px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  scroll-behavior: smooth;
}

.chat-messages::-webkit-scrollbar {
  width: 4px;
}

.chat-messages::-webkit-scrollbar-track {
  background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

.messages-start-indicator {
  text-align: center;
  padding: 20px 0 16px;
}

.messages-start-indicator span {
  font-size: 0.75em;
  color: var(--text-muted);
  background: var(--bg);
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid var(--border);
}

/* Message groups */
.message-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-bottom: 12px;
  width: fit-content;
  max-width: 100%;
}

.message-group.mine {
  align-items: flex-end;
}

.message-group.theirs {
  align-items: flex-start;
}

.message-group.system-group {
  align-items: center;
}

.message-sender {
  font-size: 0.72em;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 4px;
  padding: 0 4px;
}

.message-bubble {
  max-width: 70%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 0.9em;
  line-height: 1.5;
  word-wrap: break-word;
  position: relative;
}

.message-group.mine .message-bubble {
  background: var(--accent);
  color: white;
  border-bottom-right-radius: 4px;
}

.message-group.theirs .message-bubble {
  background: var(--bg);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}

.message-bubble.hidden-message {
  background: #f7f7f7;
  border: 1px dashed #ddd;
  color: var(--text-muted);
  font-style: italic;
  font-size: 0.82em;
}

.message-group.mine .message-bubble.hidden-message {
  background: rgba(189, 123, 255, 0.1);
  color: rgba(167, 83, 251, 0.7);
}

.message-bubble.pending-message-bubble {
  opacity: 0.7;
  font-style: italic;
}

.message-group.pending-message {
  opacity: 0.6;
}

.approve-btn {
  font-size: 0.68em;
  color: #fff;
  background: var(--accent);
  border: none;
  cursor: pointer;
  padding: 2px 8px;
  border-radius: 4px;
  opacity: 1;
  transition: background 0.2s ease;
  font-weight: 600;
}

.approve-btn:hover {
  background: var(--accent-dark);
}

.message-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 3px;
  padding: 0 4px;
}

.message-group.mine .message-meta {
  flex-direction: row-reverse;
}

.like-btn {
  font-size: 0.68em;
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--text-muted);
  transition: background 0.2s ease, color 0.2s ease, opacity 0.15s ease;
  display: flex;
  align-items: center;
  gap: 3px;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
}

.message-group:hover .like-btn {
  opacity: 1;
  pointer-events: auto;
}

.like-btn.liked,
.like-btn.has-likes {
  opacity: 1;
  pointer-events: auto;
}

.like-btn.liked {
  color: #e05a7a;
}

.like-btn:hover {
  background: var(--bg);
  color: #e05a7a;
}

.like-count {
  font-size: 1em;
  font-weight: 600;
}

.message-time {
  font-size: 0.68em;
  color: var(--text-muted);
  opacity: 0;
  transition: opacity 0.15s ease;
}

.message-group:hover .message-time {
  opacity: 1;
}

.hide-btn {
  font-size: 0.68em;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  opacity: 0;
  pointer-events: none;
  transition: background 0.2s ease, opacity 0.15s ease;
}

.message-group:hover .hide-btn {
  opacity: 1;
  pointer-events: auto;
}

.hide-btn:hover {
  background: var(--bg);
  color: var(--error);
}

.ban-btn {
  font-size: 0.68em;
  color: var(--error);
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  opacity: 0;
  pointer-events: none;
  transition: background 0.2s ease, opacity 0.15s ease;
  font-weight: 600;
}

.ban-btn:hover {
  background: #fff5f5;
}

.message-group:hover .ban-btn {
  opacity: 1;
  pointer-events: auto;
}

.delete-msg-btn {
  font-size: 0.68em;
  color: var(--error);
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  opacity: 0;
  pointer-events: none;
  transition: background 0.2s ease, opacity 0.15s ease;
  font-weight: 600;
}

.delete-msg-btn:hover {
  background: #fff5f5;
}

.message-group:hover .delete-msg-btn {
  opacity: 1;
  pointer-events: auto;
}

.pin-btn {
  font-size: 0.68em;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  opacity: 0;
  pointer-events: none;
  transition: background 0.2s ease, opacity 0.15s ease, color 0.2s ease;
  display: flex;
  align-items: center;
}

.pin-btn:hover {
  background: var(--accent-light);
  color: var(--accent-dark);
}

.pin-btn.pinned {
  color: var(--accent);
  opacity: 1;
  pointer-events: auto;
}

.message-group:hover .pin-btn {
  opacity: 1;
  pointer-events: auto;
}

.unpin-banner-btn {
  margin-left: auto;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--accent-dark);
  opacity: 0.6;
  padding: 4px;
  border-radius: 4px;
  transition: background 0.2s ease, opacity 0.2s ease;
}

.unpin-banner-btn:hover {
  background: rgba(189, 123, 255, 0.2);
  opacity: 1;
}

.system-message {
  font-size: 0.75em;
  color: var(--text-muted);
  text-align: center;
  padding: 4px 16px;
  font-style: italic;
}

/* PINNED MESSAGE BANNER */
.pinned-message-banner {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  background: linear-gradient(135deg, #f5edff 0%, #ede4ff 100%);
  border-bottom: 1px solid rgba(189, 123, 255, 0.25);
  border-left: 3px solid var(--accent);
  flex-shrink: 0;
  overflow: hidden;
}

.pin-banner-icon {
  color: var(--accent-dark);
  flex-shrink: 0;
}

.pinned-message-sender {
  font-size: 0.75em;
  font-weight: 600;
  color: var(--accent-dark);
  white-space: nowrap;
  flex-shrink: 0;
}

.pinned-message-text {
  font-size: 0.75em;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

/* TYPING BAR */
.typing-bar {
  padding: 0 20px 6px 20px;
  flex-shrink: 0;
  min-height: 24px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.typing-text {
  font-size: 0.78em;
  color: var(--text-muted);
  font-style: italic;
}

.typing-dots {
  display: flex;
  gap: 3px;
  align-items: center;
}

.typing-dots span {
  width: 4px;
  height: 4px;
  background: var(--text-muted);
  border-radius: 50%;
  animation: typingBounce 1.2s infinite;
}

.typing-dots span:nth-child(2) {
  animation-delay: 0.2s;
}
.typing-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typingBounce {
  0%,
  60%,
  100% {
    transform: translateY(0);
  }
  30% {
    transform: translateY(-4px);
  }
}

/* EMOJI PICKER */
.emoji-picker-btn {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: none;
  border: 1.5px solid var(--border);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.1em;
  transition: background 0.2s ease, border-color 0.2s ease;
  color: var(--text-secondary);
}

.emoji-picker-btn:hover {
  background: var(--accent-light);
  border-color: var(--accent);
}

.emoji-picker-popup {
  position: absolute;
  bottom: 70px;
  left: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 12px;
  z-index: 100;
  width: 300px;
  animation: slideUp 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.emoji-picker-popup.hidden {
  display: none;
}

.emoji-picker-categories {
  display: flex;
  gap: 4px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
  overflow-x: auto;
}

.emoji-picker-categories::-webkit-scrollbar {
  display: none;
}

.emoji-cat-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1em;
  padding: 4px 6px;
  border-radius: 6px;
  flex-shrink: 0;
  transition: background 0.15s ease;
}

.emoji-cat-btn:hover,
.emoji-cat-btn.active {
  background: var(--accent-light);
}

.emoji-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 2px;
  max-height: 180px;
  overflow-y: auto;
}

.emoji-grid::-webkit-scrollbar {
  width: 3px;
}

.emoji-grid::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

.emoji-item {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.2em;
  padding: 4px;
  border-radius: 6px;
  text-align: center;
  transition: background 0.15s ease, transform 0.1s ease;
  line-height: 1;
}

.emoji-item:hover {
  background: var(--accent-light);
  transform: scale(1.2);
}

/* INPUT AREA */
.chat-input-area {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding: 12px 16px;
  background: var(--surface);
  flex-shrink: 0;
  position: relative;
}

.chat-input-area textarea {
  flex-grow: 1;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 10px 14px;
  font-family: var(--font);
  font-size: 0.9em;
  color: var(--text-primary);
  background: var(--bg);
  resize: none;
  outline: none;
  height: 42px;
  min-height: 42px;
  max-height: 120px;
  overflow-y: hidden;
  line-height: 1.4;
  box-sizing: border-box;
  transition: border-color 0.2s ease;
}

.chat-input-area textarea:focus {
  border-color: var(--accent);
}

.chat-input-area textarea::placeholder {
  color: var(--text-muted);
}

.send-btn {
  width: 41px;
  height: 41px;
  border-radius: 12px;
  background: var(--accent);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s ease, transform 0.1s ease;
  margin-bottom: 1px;
}

.send-btn:hover {
  background: var(--accent-dark);
  transform: scale(1.05);
}

.send-btn:active {
  transform: scale(0.97);
}

.send-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

/* FOOTER */
.chat-footer {
  padding: 8px 16px;
  text-align: center;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.chat-footer a {
  font-size: 0.72em;
  color: var(--text-muted);
  text-decoration: none;
}

.chat-footer a:hover {
  color: var(--accent);
}

/* =====================
   VIDEO PANELS
   ===================== */

.prechat-video-panel {
  display: none;
}

.prechat-video-wrapper {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 */
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: #000;
}

.prechat-video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Chat screen: side-by-side layout when video present */
#chatScreen {
  background: var(--bg);
  padding: 0;
  align-items: stretch;
  justify-content: stretch;
}

.chat-screen-inner {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.chat-video-panel {
  flex-grow: 1;
  flex-shrink: 1;
  min-width: 0;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  order: 2;
}

.chat-video-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
}

.chat-video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.form-privacy-notice {
  font-size: 8px;
  color: var(--text-muted);
  text-align: center;
  margin: 4px 0 0;
  line-height: 1.5;
}
.form-privacy-notice a {
  color: var(--text-muted);
}

/* =====================
   RESPONSIVE
   ===================== */

@media (max-width: 640px) {
  .prechat-card {
    padding: 28px 24px;
    border-radius: 20px;
  }

  /* Hide video entirely on mobile */
  .prechat-video-panel,
  .chat-video-panel {
    display: none !important;
  }

  .chat-layout,
  .chat-layout.no-video {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    border-radius: 0;
    margin: 0 auto;
  }

  .message-bubble {
    max-width: 85%;
  }
}

/* © 2026 HumanWidget. All Rights Reserved. */
