/* Rich export dock — below chat composer (portal + mahatraining) */
.chat-export-dock {
  margin-top: 0.65rem;
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.04) 0%, rgba(37, 99, 235, 0.06) 100%);
}

.chat-export-dock.hidden {
  display: none;
}

.chat-export-dock-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin-bottom: 0.55rem;
}

.chat-export-dock-title {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #334155;
}

.chat-export-theme {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  color: #64748b;
}

.chat-export-theme select {
  font-size: 0.78rem;
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background: #fff;
}

.chat-export-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.chat-export-btn {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.35rem 0.7rem;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #1e293b;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}

.chat-export-btn:hover:not(:disabled) {
  background: #eff6ff;
  border-color: #2563eb;
  transform: translateY(-1px);
}

.chat-export-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.chat-export-btn-primary {
  background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%);
  border-color: #1d4ed8;
  color: #fff;
}

.chat-export-btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #1d4ed8 0%, #3b82f6 100%);
}

.chat-export-btn.is-busy {
  opacity: 0.65;
  pointer-events: none;
}

.chat-export-hint {
  margin: 0.45rem 0 0;
  font-size: 0.72rem;
  color: #64748b;
  line-height: 1.4;
}

.chat-export-preview-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.72);
  padding: 1rem;
}

.chat-export-preview-modal.hidden {
  display: none;
}

.chat-export-preview-panel {
  width: min(960px, 100%);
  height: min(85vh, 900px);
  background: #0f172a;
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
}

.chat-export-preview-toolbar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 0.85rem;
  background: #1e293b;
  color: #e2e8f0;
  font-size: 0.85rem;
}

.chat-export-preview-toolbar .spacer {
  flex: 1;
}

.chat-export-preview-status {
  font-size: 0.78rem;
  color: #94a3b8;
  margin-left: 0.5rem;
}

.chat-export-preview-frame {
  flex: 1;
  border: none;
  width: 100%;
  background: #fff;
}

.maha-body .chat-export-dock {
  border-color: rgba(201, 162, 39, 0.25);
  background: linear-gradient(135deg, rgba(26, 39, 68, 0.05) 0%, rgba(201, 162, 39, 0.08) 100%);
  margin: 0.75rem 0 0;
}

.wb-chat-layout .chat-export-dock {
  margin: 0.5rem 0 0.25rem;
  flex-shrink: 0;
}
