/* Shared component rules extracted safely from repeated selectors */
.modal-card {
  width: 100%;
  max-width: 460px;
  background: linear-gradient(180deg, #171b24 0%, #12161e 100%);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 22px;
  box-shadow: 0 20px 46px rgba(0,0,0,0.4);
  padding: 24px;
}

.modal-card h3 {
  font-size: 24px;
  line-height: 1.2;
  margin-bottom: 10px;
}

.modal-card p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 18px;
}

.modal-label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
}

.modal-field {
  margin-bottom: 14px;
}

.modal-input {
  width: 100%;
  height: 46px;
  border-radius: 12px;
  border: 1px solid #334155;
  background: #0f131b;
  color: #fff;
  padding: 0 14px;
  font-size: 14px;
  outline: none;
  transition: 0.18s ease;
}

.modal-input:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.16);
}

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 18px;
  flex-wrap: wrap;
}

.modal-alert {
  display: none;
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.6;
  border: 1px solid transparent;
}

.modal-alert.show {
  display: block;
}

.modal-alert.success {
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.22);
  color: #bbf7d0;
}

.modal-alert.error {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.22);
  color: #fecaca;
}

.modal-backdrop.show {
  display: flex;
}

.bubble a {
  text-decoration: underline;
  font-weight: 600;
  word-break: break-all;
}

.bubble.left a {
  color: #8fc2ff;
}

.bubble.right a {
  color: #ffffff;
}

.agent-avatar.has-photo {
  background: #101216;
  border-color: rgba(255, 255, 255, 0.14);
}

.agent-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.agent-avatar-fallback {
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.02em;
}

.open-chat-btn:hover {
  filter: brightness(1.04);
  transform: translateY(-1px);
}

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

.toast.show {
  opacity: 1;
  transform: translateY(0);
}
