/* In-app booking message thread (admin, driver, customer) */
.abm-panel {
  display: flex;
  flex-direction: column;
  min-height: 280px;
  max-height: min(60vh, 480px);
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
}

.abm-panel--overlay {
  position: absolute;
  inset: 0;
  z-index: 20;
  max-height: none;
  min-height: 0;
  border-radius: 0;
  background: #fff;
}

.abm-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid #e2e8f0;
  background: #fff;
  flex-shrink: 0;
}

.abm-header h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  flex: 1;
}

.abm-notice {
  margin: 0;
  padding: 10px 14px;
  font-size: 12px;
  line-height: 1.45;
  color: #475569;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.abm-notice--info {
  background: #eff6ff;
  color: #1e40af;
  border-bottom-color: #bfdbfe;
}

.abm-notice--warn {
  background: #fffbeb;
  color: #92400e;
  border-bottom: 1px solid #fde68a;
}

.abm-back {
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 4px;
  color: #64748b;
  border-radius: 8px;
}

.abm-back:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.abm-thread {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.abm-row {
  display: flex;
  flex-direction: column;
  max-width: 88%;
}

.abm-row--me {
  align-self: flex-end;
  align-items: flex-end;
}

.abm-row--them {
  align-self: flex-start;
  align-items: flex-start;
}

.abm-meta {
  font-size: 11px;
  color: #94a3b8;
  margin-bottom: 4px;
}

.abm-bubble {
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.45;
  word-break: break-word;
}

.abm-bubble--me {
  background: #0071e3;
  color: #fff;
  border-bottom-right-radius: 4px;
}

.abm-bubble--them {
  background: #fff;
  color: #0f172a;
  border: 1px solid #e2e8f0;
  border-bottom-left-radius: 4px;
}

.abm-empty {
  text-align: center;
  color: #94a3b8;
  font-size: 14px;
  padding: 24px 12px;
}

.abm-compose {
  padding: 12px 14px;
  border-top: 1px solid #e2e8f0;
  background: #fff;
  flex-shrink: 0;
}

.abm-compose textarea {
  width: 100%;
  min-height: 72px;
  resize: vertical;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  box-sizing: border-box;
}

.abm-compose-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
  gap: 8px;
}

.abm-send {
  background: #0071e3;
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.abm-send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.abm-loading {
  padding: 24px;
  text-align: center;
  color: #64748b;
  font-size: 14px;
}
