/* === Imagen inline en burbuja del usuario === */
.haon-msg--user .haon-msg-bubble {
  padding: 8px;
}
.haon-msg-image {
  max-width: 200px;
  max-height: 200px;
  width: 100%;
  border-radius: 12px;
  display: block;
  object-fit: cover;
}
.haon-msg-text {
  padding: 8px 6px 4px;
  font-size: 14px;
  line-height: 1.5;
}
.haon-msg--user .haon-msg-bubble:has(.haon-msg-image) {
  padding: 6px;
  background: rgba(91, 163, 232, 0.12);
}

/* === Preview de imagen sobre el composer === */
.haon-image-preview {
  margin-bottom: 12px;
  display: flex;
  justify-content: flex-start;
}
.haon-image-preview-card {
  position: relative;
  display: inline-block;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  background: rgba(15, 40, 71, 0.8);
  border: 2px solid rgba(91, 163, 232, 0.4);
}
.haon-image-preview-card img {
  display: block;
  max-width: 200px;
  max-height: 160px;
  object-fit: cover;
}
.haon-image-preview-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.haon-image-preview-remove:hover {
  background: rgba(255, 60, 60, 0.9);
}

/* === MODO EXPRESS - Form inline en burbuja === */
.haon-form-express-bubble {
  background: rgba(15, 40, 71, 0.6) !important;
  border: 1px solid rgba(91, 163, 232, 0.3);
  padding: 20px !important;
  max-width: 540px;
}
.haon-fx-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--haon-blue-light, #5BA3E8);
  margin-bottom: 4px;
  letter-spacing: 0.3px;
}
.haon-fx-sub {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 16px;
}
.haon-fx-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 12px;
  margin-bottom: 16px;
}
.haon-fx-grid label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.7);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  font-weight: 400;
}
.haon-fx-grid input,
.haon-fx-grid select {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 9px 11px;
  color: #fff;
  font-size: 14px;
  font-weight: 400;
  outline: none;
  transition: border 0.15s, background 0.15s;
  text-transform: none;
  letter-spacing: 0;
}
.haon-fx-grid input:focus,
.haon-fx-grid select:focus {
  border-color: rgba(91, 163, 232, 0.6);
  background: rgba(255, 255, 255, 0.1);
}
.haon-fx-grid input[data-fx="no_contenedor"] {
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 400;
}
.haon-fx-grid input::placeholder {
  color: rgba(255, 255, 255, 0.3);
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
}
.haon-fx-grid select option {
  background: #0f2847;
  color: #fff;
}
.haon-fx-submit {
  width: 100%;
  background: linear-gradient(135deg, #f5c842 0%, #e8b432 100%);
  color: #0f2847;
  border: none;
  border-radius: 10px;
  padding: 12px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.15s;
  text-transform: uppercase;
}
.haon-fx-submit:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(245, 200, 66, 0.3);
}
.haon-fx-submit:disabled {
  opacity: 0.5;
  cursor: wait;
}

/* Móvil: 1 columna */
@media (max-width: 640px) {
  .haon-fx-grid {
    grid-template-columns: 1fr;
  }
  .haon-form-express-bubble {
    max-width: 100%;
  }
}


/* ===== BOTONES INLINE EN BURBUJA DE CERT EMITIDO ===== */
.haon-cert-actions-inline {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  flex-wrap: wrap;
}
.haon-cert-btn-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 400;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}
.haon-cert-btn-primary {
  background: linear-gradient(135deg, #facc15 0%, #eab308 100%);
  color: #1a1a2e;
  box-shadow: 0 2px 8px rgba(250, 204, 21, 0.3);
}
.haon-cert-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(250, 204, 21, 0.4);
}
.haon-cert-btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #e0e6f0;
  border: 1px solid rgba(255, 255, 255, 0.15);
}
.haon-cert-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
}
.haon-cert-btn-icon {
  font-size: 16px;
  line-height: 1;
}

